Use systemctl helper to avoid deadlocks with ynh 2.7 and check path avaibility with no deprecated method

This commit is contained in:
Julien Vaubourg
2017-08-30 14:27:56 +02:00
parent df431e8f78
commit 50c3346c26
4 changed files with 51 additions and 11 deletions

View File

@@ -17,15 +17,17 @@
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
source ./helpers
# Retrieve arguments
domain=$(sudo yunohost app setting vpnclient domain)
# The End
sudo systemctl stop ynh-vpnclient-checker.service
ynh_systemctl stop ynh-vpnclient-checker.service
sudo systemctl disable ynh-vpnclient-checker.service
sudo systemctl stop ynh-vpnclient-checker.timer && sleep 1
ynh_systemctl stop ynh-vpnclient-checker.timer && sleep 1
sudo systemctl disable ynh-vpnclient-checker.timer
sudo systemctl stop ynh-vpnclient
ynh_systemctl stop ynh-vpnclient
sudo systemctl disable ynh-vpnclient
sudo yunohost service remove ynh-vpnclient
sudo rm -f /etc/systemd/system/ynh-vpnclient* /usr/local/bin/ynh-vpnclient*