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

Fix Service logs

This commit is contained in:
yalh76 2019-02-02 00:33:27 +01:00
parent f02a3a54e5
commit 3f3fec6d1c
3 changed files with 18 additions and 2 deletions

View file

@ -7,7 +7,7 @@ Type=simple
User=__APP__
Group=__APP__
WorkingDirectory=__FINALPATH__/
ExecStart=__NODEJS_PATH__/node __FINALPATH__/server >> /var/log/__APP__/__APP__.log 2>&1
ExecStart=/bin/sh -c '__NODEJS_PATH__/node __FINALPATH__/server >> /var/log/__APP__/__APP__.log 2>&1'
[Install]
WantedBy=multi-user.target

View file

@ -170,9 +170,17 @@ ynh_system_user_create "$app" "$final_path"
#=================================================
# SPECIFIC SETUP
#=================================================
# ...
# CREATE LOG FOLDER
#=================================================
mkdir -p "/var/log/$app"
chown -R "$app":"$app" "/var/log/$app"
#=================================================
# MAKE SETUP
#=================================================
chown -R "$app":"$app" "$final_path"
pushd $final_path

View file

@ -101,6 +101,7 @@ ynh_install_nodejs 10
ynh_restore_file "/etc/systemd/system/$app.service"
systemctl enable $app.service
systemctl daemon-reload
#=================================================
# ADVERTISE SERVICE IN ADMIN PANEL
@ -129,6 +130,13 @@ ynh_restore_file "/etc/logrotate.d/$app"
#systemctl reload php5-fpm
systemctl reload nginx
#=================================================
# CREATE LOG FOLDER
#=================================================
mkdir -p "/var/log/$app"
chown -R "$app":"$app" "/var/log/$app"
#=================================================
# START SERVICE
#=================================================