mirror of
https://github.com/YunoHost-Apps/pico_ynh.git
synced 2024-09-03 19:56:41 +02:00
comment datadir
This commit is contained in:
parent
ae004eb4b8
commit
4febe2d036
5 changed files with 31 additions and 35 deletions
|
@ -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
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue