mirror of
https://github.com/YunoHost-Apps/bookstack_ynh.git
synced 2024-09-03 18:16:02 +02:00
cleaning
This commit is contained in:
parent
e49462acc4
commit
f16f034cf9
3 changed files with 8 additions and 38 deletions
|
@ -17,18 +17,11 @@ timezone="$(cat /etc/timezone)"
|
|||
redis_db=$(ynh_redis_get_free_db)
|
||||
email=$(ynh_user_get_info --username=$admin --key=mail)
|
||||
|
||||
fpm_footprint="low"
|
||||
fpm_free_footprint=0
|
||||
fpm_usage="low"
|
||||
|
||||
#=================================================
|
||||
# STORE SETTINGS FROM MANIFEST
|
||||
#=================================================
|
||||
|
||||
ynh_app_setting_set --app=$app --key=redis_db --value=$redis_db
|
||||
ynh_app_setting_set --app=$app --key=fpm_footprint --value=$fpm_footprint
|
||||
ynh_app_setting_set --app=$app --key=fpm_free_footprint --value=$fpm_free_footprint
|
||||
ynh_app_setting_set --app=$app --key=fpm_usage --value=$fpm_usage
|
||||
|
||||
#=================================================
|
||||
# DOWNLOAD, CHECK AND UNPACK SOURCE
|
||||
|
@ -40,10 +33,10 @@ ynh_setup_source --dest_dir="$install_dir"
|
|||
#=================================================
|
||||
# SYSTEM CONFIGURATION
|
||||
#=================================================
|
||||
ynh_script_progression --message="Adding system configurations related to $app ..." --weight=1
|
||||
ynh_script_progression --message="Adding system configurations related to $app..." --weight=1
|
||||
|
||||
# Create a dedicated PHP-FPM config
|
||||
ynh_add_fpm_config --usage=$fpm_usage --footprint=$fpm_footprint
|
||||
ynh_add_fpm_config
|
||||
|
||||
# Create a dedicated NGINX config
|
||||
ynh_add_nginx_config
|
||||
|
@ -51,12 +44,12 @@ ynh_add_nginx_config
|
|||
# Create a dedicated systemd config
|
||||
ynh_add_systemd_config
|
||||
|
||||
yunohost service add $app --description="BookStack Queue Worker" --log="/var/log/$app/$app.log"
|
||||
yunohost service add $app --description="Platform to create documentation/wiki content" --log="/var/log/$app/$app.log"
|
||||
|
||||
#=================================================
|
||||
# INSTALL BOOKSTACK WITH COMPOSER
|
||||
#=================================================
|
||||
ynh_script_progression --message="Installing BookStack with Composer..." --weight=5
|
||||
ynh_script_progression --message="Installing $app with Composer..." --weight=5
|
||||
|
||||
# Install composer
|
||||
ynh_install_composer
|
||||
|
@ -76,7 +69,7 @@ chown $app:$app $install_dir/.env
|
|||
#=================================================
|
||||
# FINAL BOOKSTACK INSTALL
|
||||
#=================================================
|
||||
ynh_script_progression --message="Install BookStack" --weight=5
|
||||
ynh_script_progression --message="Install $app" --weight=5
|
||||
|
||||
pushd $install_dir
|
||||
php$phpversion artisan key:generate --no-interaction --force
|
||||
|
|
|
@ -43,7 +43,7 @@ ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf"
|
|||
ynh_restore_file --origin_path="/etc/systemd/system/$app.service"
|
||||
systemctl enable $app.service --quiet
|
||||
|
||||
yunohost service add $app --description="BookStack Queue Worker" --log="/var/log/$app/$app.log"
|
||||
yunohost service add $app --description="Platform to create documentation/wiki content" --log="/var/log/$app/$app.log"
|
||||
|
||||
#=================================================
|
||||
# GENERIC FINALIZATION
|
||||
|
|
|
@ -9,29 +9,6 @@
|
|||
source _common.sh
|
||||
source /usr/share/yunohost/helpers
|
||||
|
||||
#=================================================
|
||||
# ENSURE DOWNWARD COMPATIBILITY
|
||||
#=================================================
|
||||
ynh_script_progression --message="Ensuring downward compatibility..." --weight=1
|
||||
|
||||
# If fpm_footprint doesn't exist, create it
|
||||
if [ -z "${fpm_footprint:-}" ]; then
|
||||
fpm_footprint=low
|
||||
ynh_app_setting_set --app=$app --key=fpm_footprint --value=$fpm_footprint
|
||||
fi
|
||||
|
||||
# If fpm_free_footprint doesn't exist, create it
|
||||
if [ -z "${fpm_free_footprint:-}" ]; then
|
||||
fpm_free_footprint=0
|
||||
ynh_app_setting_set --app=$app --key=fpm_free_footprint --value=$fpm_free_footprint
|
||||
fi
|
||||
|
||||
# If fpm_usage doesn't exist, create it
|
||||
if [ -z "${fpm_usage:-}" ]; then
|
||||
fpm_usage=low
|
||||
ynh_app_setting_set --app=$app --key=fpm_usage --value=$fpm_usage
|
||||
fi
|
||||
|
||||
#=================================================
|
||||
# DOWNLOAD, CHECK AND UNPACK SOURCE
|
||||
#=================================================
|
||||
|
@ -46,7 +23,7 @@ ynh_setup_source --dest_dir="$install_dir" --full_replace=1 --keep=".env public/
|
|||
ynh_script_progression --message="Upgrading system configurations related to $app..." --weight=1
|
||||
|
||||
# Create a dedicated PHP-FPM config
|
||||
ynh_add_fpm_config --usage=$fpm_usage --footprint=$fpm_footprint
|
||||
ynh_add_fpm_config
|
||||
|
||||
# Create a dedicated NGINX config
|
||||
ynh_add_nginx_config
|
||||
|
@ -54,7 +31,7 @@ ynh_add_nginx_config
|
|||
# Create a dedicated systemd config
|
||||
ynh_add_systemd_config
|
||||
|
||||
yunohost service add $app --description="BookStack Queue Worker" --log="/var/log/$app/$app.log"
|
||||
yunohost service add $app --description="Platform to create documentation/wiki content" --log="/var/log/$app/$app.log"
|
||||
|
||||
#=================================================
|
||||
# INSTALL LYCHEE WITH COMPOSER
|
||||
|
|
Loading…
Reference in a new issue