mirror of
https://github.com/YunoHost-Apps/rainloop_ynh.git
synced 2024-09-03 20:16:18 +02:00
source .fonctions in every file
This commit is contained in:
parent
90f7650c29
commit
7c9f6ab660
3 changed files with 10 additions and 8 deletions
|
@ -4,12 +4,9 @@
|
|||
set -eu
|
||||
app=$YNH_APP_INSTANCE_NAME
|
||||
|
||||
# Set app specific variables
|
||||
dbname=$app
|
||||
dbuser=$app
|
||||
|
||||
# Source app helpers
|
||||
source /usr/share/yunohost/helpers
|
||||
source .fonctions
|
||||
|
||||
# Retrieve app settings
|
||||
domain=$(ynh_app_setting_get "$app" domain)
|
||||
|
@ -26,6 +23,10 @@
|
|||
# Copy dedicated php-fpm process to backup folder
|
||||
ynh_backup "/etc/php5/fpm/pool.d/${app}.conf" "php-fpm.conf"
|
||||
|
||||
# Set app specific variables
|
||||
dbname=$app
|
||||
dbuser=$app
|
||||
|
||||
# Dump the database
|
||||
mysqldump -u "$dbuser" -p"$dbpass" --no-create-db "$dbname" > ./db.sql
|
||||
ynh_backup "db.sql" "dump.sql"
|
||||
|
|
|
@ -8,6 +8,7 @@
|
|||
|
||||
# Source app helpers
|
||||
source /usr/share/yunohost/helpers
|
||||
source .fonctions
|
||||
|
||||
# Retrieve old app settings
|
||||
domain=$(ynh_app_setting_get "$app" domain)
|
||||
|
|
|
@ -2,6 +2,10 @@
|
|||
app=$YNH_APP_INSTANCE_NAME
|
||||
rainloop_version=$(cat ../sources/rainloop_version)
|
||||
|
||||
# Source app helpers
|
||||
source /usr/share/yunohost/helpers
|
||||
source .fonctions
|
||||
|
||||
# Backup the current version of the app, restore it if the upgrade fails
|
||||
# Check if old backup exists
|
||||
if sudo yunohost backup list | grep -q $app-before-upgrade > /dev/null 2>&1;
|
||||
|
@ -20,10 +24,6 @@
|
|||
set -eu
|
||||
trap EXIT_PROPERLY ERR
|
||||
|
||||
# Source app helpers
|
||||
source /usr/share/yunohost/helpers
|
||||
source .fonctions
|
||||
|
||||
# Retrieve arguments
|
||||
domain=$(ynh_app_setting_get "$app" domain)
|
||||
path=$(ynh_app_setting_get "$app" path)
|
||||
|
|
Loading…
Reference in a new issue