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

create logs

This commit is contained in:
Eric Wagoner 2022-12-29 16:41:34 -05:00
parent 99323cacf4
commit fcdd419852
2 changed files with 16 additions and 0 deletions

View file

@ -8,6 +8,8 @@ User=__APP__
Group=__APP__ Group=__APP__
WorkingDirectory=__FINALPATH__/ WorkingDirectory=__FINALPATH__/
ExecStart=/bin/bash __FINALPATH__/dockerless-run.sh ExecStart=/bin/bash __FINALPATH__/dockerless-run.sh
StandardOutput=append:/var/log/__APP__/__APP__.log
StandardError=inherit
# Sandboxing options to harden security # Sandboxing options to harden security
# Depending on specificities of your service/app, you may need to tweak these # Depending on specificities of your service/app, you may need to tweak these

View file

@ -109,6 +109,20 @@ chmod 750 "$final_path"
chmod -R o-rwx "$final_path" chmod -R o-rwx "$final_path"
chown -R $app:www-data "$final_path" chown -R $app:www-data "$final_path"
#=================================================
# CREATE LOG FILE
#=================================================
ynh_script_progression --message="Creating log file..." --weight=1
mkdir -p "/var/log/$app/"
touch "/var/log/$app/${app}.log"
chown -R $app: "/var/log/$app/"
#=================================================
# SCRIPT AND DEP INIT
#=================================================
ynh_script_progression --message="Installing service script..." --weight=1
ynh_add_config --template="dockerless-run.sh" --destination="$final_path/dockerless-run.sh" ynh_add_config --template="dockerless-run.sh" --destination="$final_path/dockerless-run.sh"
chmod 700 "$final_path/dockerless-run.sh" chmod 700 "$final_path/dockerless-run.sh"
chown $app:$app "$final_path/dockerless-run.sh" chown $app:$app "$final_path/dockerless-run.sh"