mirror of
https://github.com/YunoHost-Apps/movim_ynh.git
synced 2024-09-03 19:46:19 +02:00
Fix
This commit is contained in:
parent
9ec3cba116
commit
a09bef241f
3 changed files with 33 additions and 5 deletions
|
@ -30,6 +30,7 @@ final_path=$(ynh_app_setting_get --app=$app --key=final_path)
|
||||||
domain=$(ynh_app_setting_get --app=$app --key=domain)
|
domain=$(ynh_app_setting_get --app=$app --key=domain)
|
||||||
db_name=$(ynh_app_setting_get --app=$app --key=db_name)
|
db_name=$(ynh_app_setting_get --app=$app --key=db_name)
|
||||||
phpversion=$(ynh_app_setting_get --app=$app --key=phpversion)
|
phpversion=$(ynh_app_setting_get --app=$app --key=phpversion)
|
||||||
|
cache_dir=$(ynh_app_setting_get --app=$app --key=cache_dir)
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# DECLARE DATA AND CONF FILES TO BACKUP
|
# DECLARE DATA AND CONF FILES TO BACKUP
|
||||||
|
@ -42,6 +43,12 @@ ynh_print_info --message="Declaring files to be backed up..."
|
||||||
|
|
||||||
ynh_backup --src_path="$final_path"
|
ynh_backup --src_path="$final_path"
|
||||||
|
|
||||||
|
#=================================================
|
||||||
|
# BACKUP THE DATA DIR
|
||||||
|
#=================================================
|
||||||
|
|
||||||
|
ynh_backup --src_path="$cache_dir" --is_big
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# BACKUP THE NGINX CONFIGURATION
|
# BACKUP THE NGINX CONFIGURATION
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
|
@ -146,16 +146,25 @@ ynh_script_progression --message="Configuring a systemd service..." --weight=12
|
||||||
|
|
||||||
ynh_add_systemd_config
|
ynh_add_systemd_config
|
||||||
|
|
||||||
|
#=================================================
|
||||||
|
# CREATE DATA DIRECTORY
|
||||||
|
#=================================================
|
||||||
|
ynh_script_progression --message="Creating a data directory..." --weight=1
|
||||||
|
|
||||||
|
cache_dir=/home/yunohost.app/$app
|
||||||
|
ynh_app_setting_set --app=$app --key=cache_dir --value=$cache_dir
|
||||||
|
|
||||||
|
mkdir -p $cache_dir
|
||||||
|
|
||||||
|
chmod 750 "$cache_dir"
|
||||||
|
chmod -R o-rwx "$cache_dir"
|
||||||
|
chown -R $app:www-data "$cache_dir"
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# SET-UP DATABASE AND CONFIGURATION
|
# SET-UP DATABASE AND CONFIGURATION
|
||||||
#=================================================
|
#=================================================
|
||||||
ynh_script_progression --message="Configuring Movim..." --weight=1
|
ynh_script_progression --message="Configuring Movim..." --weight=1
|
||||||
|
|
||||||
# Create cachedir folder
|
|
||||||
cache_dir="/home/yunohost.app/$app"
|
|
||||||
mkdir -p $cache_dir
|
|
||||||
chown -R $app:www-data "$final_path"
|
|
||||||
|
|
||||||
pushd $final_path
|
pushd $final_path
|
||||||
php$phpversion composer.phar $app:migrate --quiet
|
php$phpversion composer.phar $app:migrate --quiet
|
||||||
#php$phpversion daemon.php setAdmin $admin@${maindomain}
|
#php$phpversion daemon.php setAdmin $admin@${maindomain}
|
||||||
|
|
|
@ -21,6 +21,7 @@ final_path=$(ynh_app_setting_get --app=$app --key=final_path)
|
||||||
port=$(ynh_app_setting_get --app=$app --key=port)
|
port=$(ynh_app_setting_get --app=$app --key=port)
|
||||||
db_name=$(ynh_app_setting_get --app=$app --key=db_name)
|
db_name=$(ynh_app_setting_get --app=$app --key=db_name)
|
||||||
db_user=$db_name
|
db_user=$db_name
|
||||||
|
cache_dir=$(ynh_app_setting_get --app=$app --key=cache_dir)
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# STANDARD REMOVE
|
# STANDARD REMOVE
|
||||||
|
@ -83,6 +84,17 @@ ynh_script_progression --message="Removing Movim cache directory..." --weight=6
|
||||||
# Remove the app directory securely
|
# Remove the app directory securely
|
||||||
ynh_secure_remove --file="/home/yunohost.app/$app"
|
ynh_secure_remove --file="/home/yunohost.app/$app"
|
||||||
|
|
||||||
|
#=================================================
|
||||||
|
# REMOVE DATA DIR
|
||||||
|
#=================================================
|
||||||
|
|
||||||
|
# Remove the data directory if --purge option is used
|
||||||
|
if [ "${YNH_APP_PURGE:-0}" -eq 1 ]
|
||||||
|
then
|
||||||
|
ynh_script_progression --message="Removing app data directory..." --weight=1
|
||||||
|
ynh_secure_remove --file="$cache_dir"
|
||||||
|
fi
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# REMOVE PHP-FPM CONFIGURATION
|
# REMOVE PHP-FPM CONFIGURATION
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
Loading…
Add table
Reference in a new issue