From b6736049ef73e527a70771bdfc6a252ab5f533ba Mon Sep 17 00:00:00 2001 From: jarod5001 <68397534+jarod5001@users.noreply.github.com> Date: Fri, 18 Mar 2022 22:58:13 +0100 Subject: [PATCH] no data dir + no systemd --- scripts/restore | 35 +---------------------------------- 1 file changed, 1 insertion(+), 34 deletions(-) diff --git a/scripts/restore b/scripts/restore index d75ea39..f94778b 100755 --- a/scripts/restore +++ b/scripts/restore @@ -32,7 +32,7 @@ domain=$(ynh_app_setting_get --app=$app --key=domain) path_url=$(ynh_app_setting_get --app=$app --key=path) final_path=$(ynh_app_setting_get --app=$app --key=final_path) phpversion=$(ynh_app_setting_get --app=$app --key=phpversion) -datadir=$(ynh_app_setting_get --app=$app --key=datadir) + #================================================= # CHECK IF THE APP CAN BE RESTORED @@ -76,25 +76,6 @@ chmod 750 "$final_path" chmod -R o-rwx "$final_path" chown -R $app:www-data "$final_path" -#================================================= -# RESTORE THE DATA DIRECTORY -#================================================= -ynh_script_progression --message="Restoring the data directory..." --time --weight=1 - -ynh_restore_file --origin_path="$datadir" --not_mandatory - -mkdir -p $datadir - -# FIXME: this should be managed by the core in the future -# Here, as a packager, you may have to tweak the ownerhsip/permissions -# such that the appropriate users (e.g. maybe www-data) can access -# files in some cases. -# But FOR THE LOVE OF GOD, do not allow r/x for "others" on the entire folder - -# this will be treated as a security issue. -chmod 750 "$datadir" -chmod -R o-rwx "$datadir" -chown -R $app:www-data "$datadir" - #================================================= # RESTORE THE PHP-FPM CONFIGURATION #================================================= @@ -131,20 +112,6 @@ ynh_script_progression --message="Restoring the logrotate configuration..." --ti ynh_restore_file --origin_path="/etc/logrotate.d/$app" -#================================================= -# INTEGRATE SERVICE IN YUNOHOST -#================================================= -ynh_script_progression --message="Integrating service in YunoHost..." --time --weight=1 - -yunohost service add $app --description="A short description of the app" --log="/var/log/$app/$app.log" - -#================================================= -# START SYSTEMD SERVICE -#================================================= -ynh_script_progression --message="Starting a systemd service..." --time --weight=1 - -ynh_systemd_action --service_name=$app --action="start" --log_path="/var/log/$app/$app.log" - #================================================= # GENERIC FINALIZATION #=================================================