diff --git a/scripts/install b/scripts/install index 7dc6f08..f4aee3b 100644 --- a/scripts/install +++ b/scripts/install @@ -1,8 +1,33 @@ #!/bin/bash -#Retrieve arguments -domain=$1 -is_public=$2 +#================================================= +# GENERIC START +#================================================= +# IMPORT GENERIC HELPERS +#================================================= + +source _common.sh +source /usr/share/yunohost/helpers + +#================================================= +# MANAGE SCRIPT FAILURE +#================================================= + +# Exit if an error occurs during the execution of the script +ynh_abort_if_errors + +#================================================= +# RETRIEVE ARGUMENTS FROM THE MANIFEST +#================================================= + +domain=$YNH_APP_ARG_DOMAIN +path_url=$YNH_APP_ARG_PATH +admin=$YNH_APP_ARG_ADMIN +is_public=$YNH_APP_ARG_IS_PUBLIC +language=$YNH_APP_ARG_LANGUAGE + +app=$YNH_APP_INSTANCE_NAME + ROCKETCHAT_VERSION=0.57.2 NODE_VERSION=4.7.1 diff --git a/scripts/remove b/scripts/remove index dbc0869..3597f2d 100644 --- a/scripts/remove +++ b/scripts/remove @@ -1,5 +1,14 @@ #!/bin/bash +#================================================= +# GENERIC START +#================================================= +# IMPORT GENERIC HELPERS +#================================================= + +source _common.sh +source /usr/share/yunohost/helpers + domain=$(sudo yunohost app setting rocketchat domain) sudo rm -rf /var/www/rocketchat @@ -9,4 +18,3 @@ sudo rm -Rf /var/log/rocketchat/ sudo systemctl stop Rocketchat.service sudo rm /etc/systemd/system/Rocketchat.service sudo systemctl restart nginx - diff --git a/scripts/upgrade b/scripts/upgrade index 583aab8..f87dbaa 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -1,4 +1,14 @@ #!/bin/bash + +#================================================= +# GENERIC START +#================================================= +# IMPORT GENERIC HELPERS +#================================================= + +source _common.sh +source /usr/share/yunohost/helpers + ROCKETCHAT_VERSION=0.57.2 NODE_VERSION=4.7.1