1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/rustdesk-server_ynh.git synced 2024-09-03 20:16:24 +02:00
This commit is contained in:
Éric Gaspar 2023-11-01 10:04:58 +01:00
parent 279a86136b
commit a0a119efc4
3 changed files with 16 additions and 6 deletions

View file

@ -9,9 +9,8 @@ Restart=always
LimitNOFILE=1000000
WorkingDirectory=__INSTALL_DIR__/
ExecStart=__INSTALL_DIR__/hbbs -r 127.0.0.1 -p __PORT_HBBS__
#StandardOutput=append:__INSTALL_DIR__/hbbs.log
#StandardError=append:__INSTALL_DIR__/hbbs.error
# Restart service after 10 seconds if node service crashes
StandardOutput=append:/var/log/__APP__/hbbs.log
StandardError=append:/var/log/__APP__/hbbs.error
RestartSec=10
[Install]

View file

@ -9,9 +9,8 @@ LimitNOFILE=1000000
ExecStart=__INSTALL_DIR__/hbbr -p __PORT_HBBR__
WorkingDirectory=__INSTALL_DIR__/
Restart=always
#StandardOutput=append:rustdesk-server/hbbr.log
#StandardError=append:rustdesk-server/hbbr.error
# Restart service after 10 seconds if node service crashes
StandardOutput=append:/var/log/__APP__/hbbr.log
StandardError=append:/var/log/__APP__/hbbr.error
RestartSec=10
[Install]

View file

@ -38,6 +38,18 @@ ynh_add_systemd_config --service=rustdesk-hbbs --template=rustdesk-hbbs.service
yunohost service add rustdesk-server --description="Remote control alternative for self-hosting" --log="/var/log/$app/$app.log"
yunohost service add rustdesk-hbbs --description="Remote control alternative for self-hosting" --log="/var/log/$app/$app.log"
# HANDLE LOG FILES AND LOGROTATE
#=================================================
ynh_script_progression --message="Configuring log rotation..." --weight=1
# Create log directory
mkdir -p /var/log/$app
touch /var/log/$app/$app.log
chown $app -R /var/log/$app
# Use logrotate to manage application logfile(s)
ynh_use_logrotate
#=================================================
# APP INITIAL CONFIGURATION
#=================================================