You disappoint me, mr systemd

This commit is contained in:
Julien Vaubourg 2016-08-14 22:30:41 +02:00
parent 72e19aaacb
commit d5f0b913af
No known key found for this signature in database
GPG Key ID: 46D5C2DE01BFEE71
4 changed files with 9 additions and 2 deletions

View File

@ -5,3 +5,6 @@ After=ynh-vpnclient.service
[Service]
Type=simple
ExecStart=/usr/local/bin/ynh-vpnclient-checker.sh
[Install]
WantedBy=default.target

View File

@ -131,6 +131,8 @@ sudo systemctl reload nginx
sudo systemctl enable ynh-vpnclient
sudo yunohost service add ynh-vpnclient
sudo systemctl start ynh-vpnclient-checker.service
sudo systemctl enable ynh-vpnclient-checker.service
sudo systemctl start ynh-vpnclient-checker.timer
sudo systemctl enable ynh-vpnclient-checker.timer

View File

@ -21,6 +21,8 @@
domain=$(sudo yunohost app setting vpnclient domain)
# The End
sudo systemctl stop ynh-vpnclient-checker.service
sudo systemctl disable ynh-vpnclient-checker.service
sudo systemctl stop ynh-vpnclient-checker.timer && sleep 1
sudo systemctl disable ynh-vpnclient-checker.timer
sudo systemctl stop ynh-vpnclient

View File

@ -29,9 +29,9 @@ export VPNCLIENT_UPGRADE=1
sudo bash /etc/yunohost/apps/vpnclient/scripts/remove &> /dev/null
bash ./install "${domain}" "${path}" "${server_name}"
sudo rmdir /etc/openvpn/keys/
sudo cp -a "${rollbackdir}/keys/" /etc/openvpn/keys/
sudo cp -a "${rollbackdir}/settings.yml" /etc/yunohost/apps/vpnclient/
sudo cp -a ${rollbackdir}/keys/* /etc/openvpn/keys/
ls /tmp/*
sudo cp -a "${rollbackdir}/client.conf.tpl" /etc/openvpn/ 2> /dev/null
# Changes