From 244b440fc938b952516028448d721f822fdbd79c Mon Sep 17 00:00:00 2001 From: Moul Date: Tue, 23 May 2017 11:51:39 +0200 Subject: [PATCH] [enh] remove: add 'set -u', source helpers, retrieve arg with helper. --- scripts/remove | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/scripts/remove b/scripts/remove index 81d3f83..14567a4 100644 --- a/scripts/remove +++ b/scripts/remove @@ -1,9 +1,15 @@ #!/bin/bash +# Exit and treat unset variables as an error +set -u + +# Source YunoHost helpers +source /usr/share/yunohost/helpers + app=mumbleserver # Getting port used by mumble to close it -port=$(sudo yunohost app setting $app port) +port=$(ynh_app_setting_get $app port) # Uninstall mumble and its dependencies sudo apt-get autoremove -y mumble-server > /dev/null 2>&1