From 4febe2d036b7e8909c22f19a328ba29a9da2004b Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Sat, 14 May 2022 18:46:02 +0200 Subject: [PATCH] comment datadir --- conf/config.yml.template | 10 +++++----- scripts/backup | 4 ++-- scripts/install | 18 +++++++----------- scripts/remove | 14 +++++++------- scripts/restore | 20 ++++++++++---------- 5 files changed, 31 insertions(+), 35 deletions(-) diff --git a/conf/config.yml.template b/conf/config.yml.template index ecd9fad..5500ccb 100644 --- a/conf/config.yml.template +++ b/conf/config.yml.template @@ -7,13 +7,13 @@ base_url: ~ # Pico will try to guess its base URL, if th rewrite_url: ~ # A boolean (true or false) indicating whether URL rewriting is forced debug: ~ # Set this to true to enable Pico's debug mode timezone: ~ # Your PHP installation might require you to manually specify a timezone -locale: # Your PHP installation might require you to manually specify a locale to use +locale: ~ # Your PHP installation might require you to manually specify a locale to use ## # Theme # theme: default # The name of your custom theme -themes_url: __DATADIR__/themes # Pico will try to guess the URL to the themes dir of your installation; +themes_url: ~ # Pico will try to guess the URL to the themes dir of your installation; # If this fails, override it here. Example: https://example.com/pico/themes/ theme_config: # Additional theme-specific config widescreen: false # Default theme: Use more horizontal space (i.e. make the site container wider) @@ -33,7 +33,7 @@ date_format: %D %T # Pico's default date format; pages_order_by_meta: author # Sort pages by meta value "author" (set "pages_order_by" to "meta") pages_order_by: alpha # Change how Pico sorts pages ("alpha" for alphabetical order, "date", or "meta") pages_order: asc # Sort pages in ascending ("asc") or descending ("desc") order -content_dir: __DATADIR__ # The path to Pico's content directory +content_dir: ~ # The path to Pico's content directory content_ext: .md # The file extension of your Markdown files content_config: # Parsedown Markdown parser config extra: true # Use the Parsedown Extra parser to support extended markup; @@ -43,14 +43,14 @@ content_config: # Parsedown Markdown parser config escape: false # Escape HTML markup in your content files; don't confuse this with some sort of # safe mode, enabling this doesn't allow you to process untrusted user input! auto_urls: true # Automatically link URLs found in your markup -assets_dir: __DATADIR__/assets # The path to Pico's assets directory +assets_dir: assets/ # The path to Pico's assets directory assets_url: ~ # Pico will try to guess the URL to the assets dir of your installation; # If this fails, override it here. Example: https://example.com/pico/assets/ ## # Plugins # -plugins_url: __DATADIR__/plugins # Pico will try to guess the URL to the plugins dir of your installation; +plugins_url: ~ # Pico will try to guess the URL to the plugins dir of your installation; # If this fails, override it here. Example: https://example.com/pico/plugins/ DummyPlugin.enabled: false # Force the plugin "DummyPlugin" to be disabled diff --git a/scripts/backup b/scripts/backup index ff029f0..c5524a8 100755 --- a/scripts/backup +++ b/scripts/backup @@ -31,7 +31,7 @@ app=$YNH_APP_INSTANCE_NAME final_path=$(ynh_app_setting_get --app=$app --key=final_path) domain=$(ynh_app_setting_get --app=$app --key=domain) phpversion=$(ynh_app_setting_get --app=$app --key=phpversion) -datadir=$(ynh_app_setting_get --app=$app --key=datadir) +#datadir=$(ynh_app_setting_get --app=$app --key=datadir) #================================================= # DECLARE DATA AND CONF FILES TO BACKUP @@ -48,7 +48,7 @@ ynh_backup --src_path="$final_path" # BACKUP THE DATA DIR #================================================= -ynh_backup --src_path="$datadir" --is_big +#ynh_backup --src_path="$datadir" --is_big #================================================= # BACKUP THE NGINX CONFIGURATION diff --git a/scripts/install b/scripts/install index 95b76d4..f87de9f 100755 --- a/scripts/install +++ b/scripts/install @@ -96,20 +96,16 @@ ynh_add_fpm_config #================================================= # CREATE DATA DIRECTORY #================================================= -ynh_script_progression --message="Creating a data directory..." --weight=1 +# ynh_script_progression --message="Creating a data directory..." --weight=1 -datadir=/home/yunohost.app/$app -ynh_app_setting_set --app=$app --key=datadir --value=$datadir +# datadir=/home/yunohost.app/$app +# ynh_app_setting_set --app=$app --key=datadir --value=$datadir -mkdir -p $datadir -mkdir -p $datadir/content -mkdir -p $datadir/assets -mkdir -p $datadir/plugins -mkdir -p $datadir/themes +# mkdir -p $datadir/{content,assets,plugins,themes} -chmod 750 "$datadir" -chmod -R o-rwx "$datadir" -chown -R $app:www-data "$datadir" +# chmod 750 "$datadir" +# chmod -R o-rwx "$datadir" +# chown -R $app:www-data "$datadir" #================================================= # ADD A CONFIGURATION diff --git a/scripts/remove b/scripts/remove index da0f947..657f0f4 100755 --- a/scripts/remove +++ b/scripts/remove @@ -18,7 +18,7 @@ app=$YNH_APP_INSTANCE_NAME domain=$(ynh_app_setting_get --app=$app --key=domain) final_path=$(ynh_app_setting_get --app=$app --key=final_path) -datadir=$(ynh_app_setting_get --app=$app --key=datadir) +#datadir=$(ynh_app_setting_get --app=$app --key=datadir) #================================================= # REMOVE APP MAIN DIR @@ -32,12 +32,12 @@ ynh_secure_remove --file="$final_path" # 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=3 - ynh_secure_remove --file="$datadir" -fi +# # 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=3 +# ynh_secure_remove --file="$datadir" +# fi #================================================= # REMOVE NGINX CONFIGURATION diff --git a/scripts/restore b/scripts/restore index 6618e9a..d99275b 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) +#datadir=$(ynh_app_setting_get --app=$app --key=datadir) #================================================= # CHECK IF THE APP CAN BE RESTORED @@ -70,18 +70,18 @@ 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..." --weight=1 +# #================================================= +# # RESTORE THE DATA DIRECTORY +# #================================================= +# ynh_script_progression --message="Restoring the data directory..." --weight=1 -ynh_restore_file --origin_path="$datadir" --not_mandatory +# ynh_restore_file --origin_path="$datadir" --not_mandatory -mkdir -p $datadir +# mkdir -p $datadir -chmod 750 "$datadir" -chmod -R o-rwx "$datadir" -chown -R $app:www-data "$datadir" +# chmod 750 "$datadir" +# chmod -R o-rwx "$datadir" +# chown -R $app:www-data "$datadir" #================================================= # REINSTALL DEPENDENCIES