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:
parent
99323cacf4
commit
fcdd419852
2 changed files with 16 additions and 0 deletions
|
@ -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
|
||||||
|
|
|
@ -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"
|
||||||
|
|
Loading…
Reference in a new issue