From 2570a411257ebb2f8e34b87f3bead2cc31c41278 Mon Sep 17 00:00:00 2001 From: mbugeia Date: Tue, 25 Nov 2014 22:20:01 +0100 Subject: [PATCH] [enh] add name choice --- scripts/install | 1 + scripts/remove | 1 + scripts/upgrade | 6 ++++++ 3 files changed, 8 insertions(+) diff --git a/scripts/install b/scripts/install index 62e37c3..b28e42b 100644 --- a/scripts/install +++ b/scripts/install @@ -37,6 +37,7 @@ then language="en" fi +sudo yunohost app setting jappix name -v $language sudo yunohost app setting jappix language -v $language sudo sed -i "s@PATHTOCHANGE@$path@g" ../conf/nginx.conf diff --git a/scripts/remove b/scripts/remove index 4fff291..acd702c 100644 --- a/scripts/remove +++ b/scripts/remove @@ -6,6 +6,7 @@ sudo rm -f /etc/nginx/conf.d/$domain.d/jappix.conf sudo yunohost app setting jappix domain -d sudo yunohost app setting jappix path -d +sudo yunohost app setting jappix name -d sudo yunohost app setting jappix language -d sudo service nginx reload diff --git a/scripts/upgrade b/scripts/upgrade index 20c569d..cf725b0 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -3,8 +3,13 @@ # Retrieve arguments domain=$(sudo yunohost app setting jappix domain) path=$(sudo yunohost app setting jappix path) +name=$(sudo yunohost app setting jappix path) language=$(sudo yunohost app setting jappix language) +if [[ "$name" = "" ]]; +then + name="YunoJappix" +fi if [[ "$language" = "" ]]; then language="en" @@ -37,6 +42,7 @@ sudo sed -i "s@PATHTOCHANGE@$path@g" $final_path/store/conf/main.xml sudo sed -i "s@PATHTOCHANGE@$path@g" $final_path/store/conf/hosts.xml sudo sed -i "s@DOMAINTOCHANGE@$domain@g" $final_path/store/conf/main.xml sudo sed -i "s@CHANGELANG@$language@g" $final_path/store/conf/main.xml +sudo sed -i "s@CHANGENAME@$name@g" $final_path/store/conf/main.xml sudo sed -i "s@DOMAINTOCHANGE@$domain@g" $final_path/store/conf/hosts.xml # Reload Nginx and regenerate SSOwat conf