1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/garradin_ynh.git synced 2024-09-03 18:36:17 +02:00

Update restore

This commit is contained in:
frju365 2017-01-29 16:32:14 +01:00 committed by GitHub
parent bcc0872fe3
commit 9ae5cfbe57

View file

@ -1,10 +1,10 @@
#!/bin/bash
# causes the shell to exit if any subcommand or pipeline returns a non-zero status
set -e
set -eu
# Source YNH helpers
. /usr/share/yunohost/helpers
# Source app helpers
source /usr/share/yunohost/helpers
# This is a multi-instance app, meaning it can be installed several times independently
# The id of the app as stated in the manifest is available as $YNH_APP_ID
@ -19,13 +19,13 @@ set -e
app=$YNH_APP_INSTANCE_NAME
# Retrieve arguments
domain=$(sudo yunohost app setting $app domain)
domain=$(sudo ynh_app_setting_set $app domain)
# Get old parameter of the app
domain=$(sudo yunohost app setting $app domain)
path=$(sudo yunohost app setting $app path)
user=$(sudo yunohost app setting $app allowed_users)
is_public=$(sudo yunohost app setting $app is_public)
domain=$(sudo ynh_app_setting_set $app domain)
path=$(sudo ynh_app_setting_set $app path)
user=$(sudo ynh_app_setting_set $app allowed_users)
is_public=$(sudo ynh_app_setting_set $app is_public)
# Check domain/path availability
sudo yunohost app checkurl $domain$path -a $app
@ -62,5 +62,5 @@ sudo service nginx reload
# Set ssowat config
if [ "$is_public" = "Yes" ];
then
sudo yunohost app setting $app unprotected_uris -v "/"
sudo ynh_app_setting_set $app unprotected_uris "/"
fi