diff --git a/manifest.json b/manifest.json index 7ea38b7..580b437 100644 --- a/manifest.json +++ b/manifest.json @@ -2,7 +2,10 @@ "name": "Shell In A Box", "id": "shellinabox", "packaging_format": 1, - "description": { + "requirements": { + "yunohost": ">> 2.3.15" + }, + "description": { "en": "Web based AJAX terminal emulator", "fr": "Émulateur de terminal web" }, diff --git a/scripts/backup b/scripts/backup index a6c1912..383377c 100644 --- a/scripts/backup +++ b/scripts/backup @@ -3,8 +3,11 @@ # causes the shell to exit if any subcommand or pipeline returns a non-zero status set -e -# Retrieve arguments -app="shellinabox" +# Source YNH helpers +. /usr/share/yunohost/helpers + +app=${!#} + domain=$(sudo yunohost app setting $app domain) # Backup directory location for the app from where the script is executed and @@ -13,4 +16,4 @@ backup_dir=$YNH_APP_BACKUP_DIR # Copy the conf files sudo mkdir -p ./conf -sudo cp -a "/etc/nginx/conf.d/${domain}.d/${app}.conf" ./conf/nginx.conf \ No newline at end of file +ynh_backup "/etc/nginx/conf.d/${domain}.d/${app}.conf" ./conf/nginx.conf \ No newline at end of file diff --git a/scripts/restore b/scripts/restore index 9e4029f..9844c5f 100644 --- a/scripts/restore +++ b/scripts/restore @@ -4,7 +4,8 @@ set -e # Retrieve arguments -app="shellinabox" +app=${!#} + domain=$(sudo yunohost app setting $app domain) path=$(sudo yunohost app setting $app path)