|
|
@ -22,6 +22,7 @@ admin=$(ynh_app_setting_get --app=$app --key=admin) |
|
|
final_path=$(ynh_app_setting_get --app=$app --key=final_path) |
|
|
final_path=$(ynh_app_setting_get --app=$app --key=final_path) |
|
|
db_name=$(ynh_app_setting_get --app=$app --key=db_name) |
|
|
db_name=$(ynh_app_setting_get --app=$app --key=db_name) |
|
|
user_home=$(ynh_app_setting_get --app=$app --key=user_home) |
|
|
user_home=$(ynh_app_setting_get --app=$app --key=user_home) |
|
|
|
|
|
use_notify_push=$(ynh_app_setting_get --app=$app --key=use_notify_push) |
|
|
phpversion=$(ynh_app_setting_get --app=$app --key=phpversion) |
|
|
phpversion=$(ynh_app_setting_get --app=$app --key=phpversion) |
|
|
|
|
|
|
|
|
fpm_footprint=$(ynh_app_setting_get --app=$app --key=fpm_footprint) |
|
|
fpm_footprint=$(ynh_app_setting_get --app=$app --key=fpm_footprint) |
|
|
@ -70,6 +71,12 @@ if [ -z "$phpversion" ]; then |
|
|
phpversion="$YNH_PHP_VERSION" |
|
|
phpversion="$YNH_PHP_VERSION" |
|
|
fi |
|
|
fi |
|
|
|
|
|
|
|
|
|
|
|
# If final_path doesn't exist, create it |
|
|
|
|
|
if [ -z "$use_notify_push" ]; then |
|
|
|
|
|
use_notify_push=0 |
|
|
|
|
|
ynh_app_setting_set --app=$app --key=use_notify_push --value=$use_notify_push |
|
|
|
|
|
fi |
|
|
|
|
|
|
|
|
#================================================= |
|
|
#================================================= |
|
|
# BACKUP BEFORE UPGRADE THEN ACTIVE TRAP |
|
|
# BACKUP BEFORE UPGRADE THEN ACTIVE TRAP |
|
|
#================================================= |
|
|
#================================================= |
|
|
@ -174,6 +181,13 @@ then |
|
|
sed --in-place --regexp-extended '/location = \/\.well\-known\/(caldav|carddav)/d' "../conf/nginx.conf" |
|
|
sed --in-place --regexp-extended '/location = \/\.well\-known\/(caldav|carddav)/d' "../conf/nginx.conf" |
|
|
fi |
|
|
fi |
|
|
|
|
|
|
|
|
|
|
|
if [ $use_notify_push -eq 1 ] |
|
|
|
|
|
then |
|
|
|
|
|
string_use_notify_push="" |
|
|
|
|
|
else |
|
|
|
|
|
string_use_notify_push="#" |
|
|
|
|
|
fi |
|
|
|
|
|
|
|
|
# Create a dedicated NGINX config |
|
|
# Create a dedicated NGINX config |
|
|
ynh_add_nginx_config |
|
|
ynh_add_nginx_config |
|
|
|
|
|
|
|
|
@ -410,6 +424,28 @@ chmod 644 "$cron_path" |
|
|
|
|
|
|
|
|
exec_occ background:cron |
|
|
exec_occ background:cron |
|
|
|
|
|
|
|
|
|
|
|
#================================================= |
|
|
|
|
|
# CONFIGURE NOTIFY_PUSH APP |
|
|
|
|
|
#================================================= |
|
|
|
|
|
|
|
|
|
|
|
if [ $use_notify_push -eq 1 ] |
|
|
|
|
|
then |
|
|
|
|
|
# If notify_push is disabled, reenable it |
|
|
|
|
|
if exec_occ app:list | awk '/Disabled/{f=1;next} f' | grep -q -w notify_push; then |
|
|
|
|
|
exec_occ app:enable notify_push |
|
|
|
|
|
# If notify_push is not installed, install it |
|
|
|
|
|
elif exec_occ app:list | awk '/Enabled/{f=1;next} /Disabled/{f=0} f' | grep -q -w notify_push; then |
|
|
|
|
|
exec_occ app:install notify_push |
|
|
|
|
|
fi |
|
|
|
|
|
|
|
|
|
|
|
mkdir -p /var/run/$app/ |
|
|
|
|
|
chown $app: /var/run/$app/ |
|
|
|
|
|
|
|
|
|
|
|
ynh_add_systemd_config --service="${app}-notify-push" |
|
|
|
|
|
|
|
|
|
|
|
ynh_systemd_action --service_name="${app}-notify-push" --action=restart |
|
|
|
|
|
fi |
|
|
|
|
|
|
|
|
#================================================= |
|
|
#================================================= |
|
|
# GENERIC FINALIZATION |
|
|
# GENERIC FINALIZATION |
|
|
#================================================= |
|
|
#================================================= |
|
|
|