systemd: migrate the SySv init script to a simple bash script
This commit is contained in:
@@ -162,7 +162,8 @@ sudo sed 's|<TPL:NGINX_REALPATH>|/var/www/vpnadmin/|g' -i /etc/php5/fpm/pool.d/v
|
|||||||
sudo sed "s|<TPL:NGINX_LOCATION>|${url_path}|g" -i /var/www/vpnadmin/config.php
|
sudo sed "s|<TPL:NGINX_LOCATION>|${url_path}|g" -i /var/www/vpnadmin/config.php
|
||||||
|
|
||||||
# Copy init script
|
# 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
|
# Set default inits
|
||||||
# The openvpn configuration is modified before the start, so the service is disabled by default
|
# The openvpn configuration is modified before the start, so the service is disabled by default
|
||||||
|
@@ -23,7 +23,7 @@ domain=$(sudo yunohost app setting vpnclient domain)
|
|||||||
# The End
|
# The End
|
||||||
sudo systemctl stop ynh-vpnclient --quiet
|
sudo systemctl stop ynh-vpnclient --quiet
|
||||||
sudo yunohost service remove ynh-vpnclient
|
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-*
|
sudo rm -f /tmp/.ynh-vpnclient-*
|
||||||
|
|
||||||
# Remove confs
|
# Remove confs
|
||||||
|
Reference in New Issue
Block a user