1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/shellinabox_ynh.git synced 2024-09-03 20:26:12 +02:00

[enh] Use latest backup specification.

This commit is contained in:
opi 2016-05-07 02:00:48 +02:00
parent 7a3a13cda9
commit 36d5a3905a
3 changed files with 12 additions and 5 deletions

View file

@ -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"
},

View file

@ -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
ynh_backup "/etc/nginx/conf.d/${domain}.d/${app}.conf" ./conf/nginx.conf

View file

@ -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)