1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/pixelfed_ynh.git synced 2024-09-03 20:06:04 +02:00

fix service

This commit is contained in:
yalh76 2019-05-31 18:37:48 +02:00
parent 9678133a6e
commit 18cb5fe0ea
5 changed files with 12 additions and 7 deletions

View file

@ -7,7 +7,7 @@ Type=simple
User=__APP__
Group=__APP__
WorkingDirectory=__FINALPATH__/
ExecStart=/usr/bin/php7.2 __FINALPATH__/artisan horizon >> /var/log/__APP__/__APP__-horizon.log 2>&1
ExecStart=/usr/bin/php7.2 __FINALPATH__/artisan horizon
Restart=on-failure
[Install]

View file

@ -35,7 +35,7 @@ db_name=$(ynh_app_setting_get --app="$app" --key=db_name)
#=================================================
ynh_print_info --message="Stopping a systemd service..."
ynh_systemd_action --service_name="${app}-horizon" --action="stop" --log_path="/var/log/$app/${app}-horizon.log"
ynh_systemd_action --service_name="${app}-horizon" --action="stop" --log_path=systemd
#=================================================
# BACKUP THE APP MAIN DIR
@ -79,7 +79,7 @@ ynh_backup --src_path="/etc/systemd/system/${app}-horizon.service"
#=================================================
ynh_print_info --message="Starting a systemd service..."
ynh_systemd_action --service_name="${app}-horizon" --action="start" --log_path="/var/log/$app/${app}-horizon.log"
ynh_systemd_action --service_name="${app}-horizon" --action="start" --log_path=systemd
#=================================================
# END OF SCRIPT

View file

@ -189,7 +189,7 @@ yunohost service add "${app}-horizon" --description "${app}-horizon daemon for $
ynh_print_info --message="Starting a systemd service..."
# Start a systemd service
ynh_systemd_action --service_name="${app}-horizon" --action="start" --log_path="/var/log/$app/${app}-horizon.log"
ynh_systemd_action --service_name="${app}-horizon" --action="start" --log_path=systemd
#=================================================
# SETUP SSOWAT

View file

@ -122,7 +122,7 @@ yunohost service add "${app}-horizon" --log "/var/log/$app/${app}-horizon.log"
#=================================================
ynh_print_info --message="Starting a systemd service..."
ynh_systemd_action --service_name="${app}-horizon" --action="start" --log_path="/var/log/$app/${app}-horizon.log"
ynh_systemd_action --service_name="${app}-horizon" --action="start" --log_path=systemd
#=================================================
# GENERIC FINALIZATION

View file

@ -65,6 +65,10 @@ if [ -z "$app_key" ]; then
ynh_app_setting_set --app="$app" --key=app_key --value="$app_key"
fi
if dpkg --compare-versions "0.9.0~ynh3" gt "$(ynh_read_manifest --manifest="/etc/yunohost/apps/$YNH_APP_INSTANCE_NAME/manifest.json" --manifest_key="version" || echo 1.0)" ; then
ynh_add_systemd_config --service="${app}-horizon" --template=horizon.service
fi
#=================================================
# BACKUP BEFORE UPGRADE THEN ACTIVE TRAP
#=================================================
@ -73,6 +77,7 @@ ynh_print_info --message="Backing up the app before upgrading (may take a while)
# Backup the current version of the app
ynh_backup_before_upgrade
ynh_clean_setup () {
read -p "key"
# restore it if the upgrade fails
ynh_restore_upgradebackup
}
@ -86,7 +91,7 @@ ynh_abort_if_errors
#=================================================
ynh_print_info --message="Stopping a systemd service..."
ynh_systemd_action --service_name="${app}-horizon" --action="stop" --log_path="/var/log/$app/${app}-horizon.log"
ynh_systemd_action --service_name="${app}-horizon" --action="stop" --log_path=systemd
#=================================================
# DOWNLOAD, CHECK AND UNPACK SOURCE
@ -227,7 +232,7 @@ fi
#=================================================
ynh_print_info --message="Starting a systemd service..."
ynh_systemd_action --service_name="${app}-horizon" --action="start" --log_path="/var/log/$app/${app}-horizon.log"
ynh_systemd_action --service_name="${app}-horizon" --action="start" --log_path=systemd
#=================================================
# RELOAD NGINX