mirror of
https://github.com/YunoHost-Apps/fittrackee_ynh.git
synced 2024-09-03 18:36:16 +02:00
fixes
This commit is contained in:
parent
e0fc4d229a
commit
e4fa1f9ffb
3 changed files with 15 additions and 10 deletions
|
@ -56,13 +56,9 @@ set -a; source "$install_dir/.env"; set +a
|
|||
pushd $install_dir
|
||||
mkdir -p .venv
|
||||
PIPENV_VENV_IN_PROJECT="enabled" PIPENV_SKIP_LOCK=true ynh_exec_warn_less python3 -m pipenv install fittrackee==$fittrackee_version python-dotenv
|
||||
|
||||
|
||||
popd
|
||||
|
||||
|
||||
|
||||
|
||||
#=================================================
|
||||
# INITIALIZE DATABASE
|
||||
#=================================================
|
||||
|
@ -70,7 +66,6 @@ popd
|
|||
|
||||
ynh_exec_warn_less $install_dir/.venv/bin/ftcli db upgrade
|
||||
|
||||
|
||||
#=================================================
|
||||
# System Configuration
|
||||
#=================================================
|
||||
|
|
|
@ -14,9 +14,20 @@ db_name=$(ynh_app_setting_get --app=$app --key=db_name)
|
|||
|
||||
#=================================================
|
||||
# STANDARD RESTORATION STEPS
|
||||
#=================================================
|
||||
# RESTORE LOGROTATE
|
||||
#=================================================
|
||||
ynh_script_progression --message="Configuring logrotate to manage application logfiles" --weight=1
|
||||
|
||||
# Use logrotate to manage application logfile(s)
|
||||
ynh_use_logrotate --specific_user=$app
|
||||
touch /var/log/$app/$app.log
|
||||
chown -R $app:www-data /var/log/$app/
|
||||
|
||||
#=================================================
|
||||
# RESTORE THE NGINX CONFIGURATION
|
||||
#=================================================
|
||||
|
||||
ynh_script_progression --message="Restoring the NGINX web server configuration..." --weight=1
|
||||
|
||||
ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf"
|
||||
|
@ -34,9 +45,8 @@ ynh_psql_execute_file_as_root --file="./db.sql" --database=$db_name
|
|||
ynh_script_progression --message="Restoring the app main directory..." --weight=1
|
||||
|
||||
ynh_restore_file --origin_path="$install_dir"
|
||||
chmod 600 $install_dir/.env
|
||||
|
||||
chmod 750 "$install_dir"
|
||||
chmod -R o-rwx "$install_dir"
|
||||
chown -R $app: "$install_dir"
|
||||
|
||||
#=================================================
|
||||
|
@ -64,7 +74,7 @@ yunohost service add "${app}_workers"
|
|||
ynh_script_progression --message="Starting a systemd service..." --weight=1
|
||||
|
||||
ynh_systemd_action --service_name="${app}" --action="start" --log_path="/var/log/$app/$app.log" --line_match="Booting worker with pid"
|
||||
ynh_systemd_action --service_name="${app}_workers" --action="start" --log_path="systemd" --line_match="ready"
|
||||
ynh_systemd_action --service_name="${app}_workers" --action="start" --log_path="/var/log/$app/$app.log" --line_match="Started"
|
||||
|
||||
#=================================================
|
||||
# GENERIC FINALIZATION
|
||||
|
|
|
@ -97,8 +97,8 @@ yunohost service add "${app}_workers"
|
|||
#=================================================
|
||||
ynh_script_progression --message="Starting a systemd service..." --weight=1
|
||||
|
||||
ynh_systemd_action --service_name="${app}" --action="start" --log_path="/var/log/$app/$app.log" --line_match="Started"
|
||||
ynh_systemd_action --service_name="${app}_workers" --action="start" --log_path="systemd" --line_match="ready"
|
||||
ynh_systemd_action --service_name="${app}" --action="start" --log_path="/var/log/$app/$app.log" --line_match="Booting worker with pid"
|
||||
ynh_systemd_action --service_name="${app}_workers" --action="start" --log_path="/var/log/$app/$app.log" --line_match="Started"
|
||||
|
||||
#=================================================
|
||||
# END OF SCRIPT
|
||||
|
|
Loading…
Reference in a new issue