From 52254fad0e8c5c2f053e6540118ec391f93e40bf Mon Sep 17 00:00:00 2001 From: Sebastien Badia Date: Wed, 13 May 2015 01:26:14 +0200 Subject: [PATCH] systemd: migrate the SySv init script to a simple bash script --- conf/{init_ynh-vpnclient => ynh-vpnclient} | 0 scripts/install | 3 ++- scripts/remove | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) rename conf/{init_ynh-vpnclient => ynh-vpnclient} (100%) diff --git a/conf/init_ynh-vpnclient b/conf/ynh-vpnclient similarity index 100% rename from conf/init_ynh-vpnclient rename to conf/ynh-vpnclient diff --git a/scripts/install b/scripts/install index 5fdfa5a..2aab9b5 100644 --- a/scripts/install +++ b/scripts/install @@ -162,7 +162,8 @@ sudo sed 's||/var/www/vpnadmin/|g' -i /etc/php5/fpm/pool.d/v sudo sed "s||${url_path}|g" -i /var/www/vpnadmin/config.php # Copy init script -sudo install -o root -g root -m 0755 ../conf/init_ynh-vpnclient /etc/init.d/ynh-vpnclient +sudo install -o root -g root -m 0755 ../conf/ynh-vpnclient /usr/local/bin/ +sudo install -o root -g root -m 0755 ../conf/ynh-vpnclient.service /lib/systemd/system/ynh-vpnclient.service # Set default inits # The openvpn configuration is modified before the start, so the service is disabled by default diff --git a/scripts/remove b/scripts/remove index 6b2fcee..52f5bff 100644 --- a/scripts/remove +++ b/scripts/remove @@ -23,7 +23,7 @@ domain=$(sudo yunohost app setting vpnclient domain) # The End sudo systemctl stop ynh-vpnclient --quiet sudo yunohost service remove ynh-vpnclient -sudo rm -f /etc/init.d/ynh-vpnclient +sudo rm -f /lib/systemd/system/ynh-vpnclient.service sudo rm -f /tmp/.ynh-vpnclient-* # Remove confs