mirror of
https://github.com/YunoHost-Apps/jirafeau_ynh.git
synced 2024-09-03 19:35:53 +02:00
[fix] Retrieve app settings in upgrade script
This commit is contained in:
parent
0ad486b1e6
commit
54e6f06c3a
2 changed files with 11 additions and 8 deletions
|
@ -1,5 +1,8 @@
|
|||
#!/bin/bash
|
||||
|
||||
# Treat unset variables as an error
|
||||
set -u
|
||||
|
||||
# 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
|
||||
# The instance number is available as $YNH_APP_INSTANCE_NUMBER (equals "1", "2", ...)
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
#!/bin/bash
|
||||
|
||||
# causes the shell to exit if any subcommand or pipeline returns a non-zero status
|
||||
set -e
|
||||
# Exit on command errors and treat unset variables as an error
|
||||
set -eu
|
||||
|
||||
# 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
|
||||
|
@ -15,12 +15,12 @@ set -e
|
|||
# db names, ...
|
||||
app=$YNH_APP_INSTANCE_NAME
|
||||
|
||||
# Retrieve arguments
|
||||
domain=$YNH_APP_ARG_DOMAIN
|
||||
path=$YNH_APP_ARG_PATH
|
||||
admin_user=$YNH_APP_ARG_ADMIN_USER
|
||||
upload_password=$YNH_APP_ARG_UPLOAD_PASSWORD
|
||||
is_public=$YNH_APP_ARG_IS_PUBLIC
|
||||
# Retrieve settings
|
||||
domain=$(sudo yunohost app setting $app domain)
|
||||
path=$(sudo yunohost app setting $app path)
|
||||
admin_user=$(sudo yunohost app setting $app admin_user)
|
||||
upload_password=$(sudo yunohost app setting $app upload_password)
|
||||
is_public=$(sudo yunohost app setting $app is_public)
|
||||
|
||||
# Remove trailing "/" for next commands
|
||||
path=${path%/}
|
||||
|
|
Loading…
Reference in a new issue