From b2e16316c00cab1b7f49f477ad406efde229df3a Mon Sep 17 00:00:00 2001 From: Moul Date: Tue, 23 May 2017 11:15:40 +0200 Subject: [PATCH] [mod] install: retrive helpers, use setting helper, move conf file definition. --- scripts/install | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/scripts/install b/scripts/install index aae19da..8ada8c5 100644 --- a/scripts/install +++ b/scripts/install @@ -13,26 +13,29 @@ welcometext=$3 port=$4 registerName=$5 -mumble_conf=/etc/mumble-server.ini +# Source YunoHost helpers +source /usr/share/yunohost/helpers + # Check port availability sudo yunohost app checkport $port if [[ ! $? -eq 0 ]]; then exit 1 fi -#check if su_password is not empty +# Check if su_password is not empty if [[ -z "$su_passwd" ]]; then exit 1 fi # Save app settings -sudo yunohost app setting $app port -v "$port" +ynh_app_setting_set $app port "$port" # install via apt-get sudo apt-get update > /dev/null 2>&1 sudo apt-get install -y mumble-server > /dev/null 2>&1 -#copying conf file +# Copying conf file +mumble_conf="/etc/mumble-server.ini" sudo cp ../conf/mumble-server.ini $mumble_conf sudo chmod 660 $mumble_conf sudo chown :mumble-server $mumble_conf @@ -56,4 +59,4 @@ sudo murmurd -supw $su_passwd sudo /etc/init.d/mumble-server restart #adding mumble as a service -sudo yunohost service add mumble-server -l /var/log/mumble-server/mumble-server.log \ No newline at end of file +sudo yunohost service add mumble-server -l /var/log/mumble-server/mumble-server.log