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 14:12:11 +01:00
parent c38bf4355c
commit d7fd67700c
5 changed files with 5 additions and 49 deletions

View file

@ -21,12 +21,6 @@ ynh_print_info --message="Declaring files to be backed up..."
ynh_backup --src_path="$install_dir"
#=================================================
# BACKUP THE NGINX CONFIGURATION
#=================================================
#ynh_backup --src_path="/etc/nginx/conf.d/$domain.d/$app.conf"
#=================================================
# BACKUP LOGROTATE
#=================================================

View file

@ -29,9 +29,6 @@ chmod +x "$install_dir/hbbs"
#=================================================
ynh_script_progression --message="Adding system configurations related to $app..." --weight=1
# Create a dedicated NGINX config using the conf/nginx.conf template
#ynh_add_nginx_config
# Create a dedicated systemd config
ynh_add_systemd_config --service=rustdeskrelay --template=rustdeskrelay.service
ynh_add_systemd_config --service=rustdesksignal --template=rustdesksignal.service
@ -39,11 +36,6 @@ ynh_add_systemd_config --service=rustdesksignal --template=rustdesksignal.servic
yunohost service add rustdeskrelay --description="Rustdesk Relay Server" --log="/var/log/$app/$app.log"
yunohost service add rustdesksignal --description="Rustdesk Signal Server" --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
@ -52,18 +44,6 @@ chown $app -R /var/log/$app
# Use logrotate to manage application logfile(s)
ynh_use_logrotate
#=================================================
# APP INITIAL CONFIGURATION
#=================================================
# ADD A CONFIGURATION
#=================================================
#ynh_script_progression --message="Adding a configuration file..." --weight=1
#ynh_add_config --template="some_config_file" --destination="$install_dir/some_config_file"
#chmod 400 "$install_dir/some_config_file"
#chown $app:$app "$install_dir/some_config_file"
#=================================================
# GENERIC FINALIZATION
#=================================================

View file

@ -31,8 +31,6 @@ fi
ynh_remove_systemd_config --service=rustdeskrelay
ynh_remove_systemd_config --service=rustdesksignal
#ynh_remove_nginx_config
# Remove the app-specific logrotate config
ynh_remove_logrotate

View file

@ -29,19 +29,17 @@ chmod +x "$install_dir/hbbs"
#=================================================
ynh_script_progression --message="Restoring system configurations related to $app..." --weight=1
#ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf"
# Create log directory
mkdir -p /var/log/$app
touch /var/log/$app/$app.log
chown $app -R /var/log/$app
ynh_restore_file --origin_path="/etc/systemd/system/rustdeskrelay.service"
systemctl enable rustdeskrelay.service --quiet
ynh_restore_file --origin_path="/etc/systemd/system/rustdesksignal.service"
systemctl enable rustdesksignal.service --quiet
# Create log directory
mkdir -p /var/log/$app
touch /var/log/$app/$app.log
chown $app -R /var/log/$app
ynh_restore_file --origin_path="/etc/logrotate.d/$app"
yunohost service add rustdeskrelay --description="Rustdesk Relay Server" --log="/var/log/$app/$app.log"

View file

@ -43,8 +43,6 @@ chmod +x "$install_dir/hbbs"
#=================================================
ynh_script_progression --message="Upgrading system configurations related to $app..." --weight=1
#ynh_add_nginx_config
# Create a dedicated systemd config
ynh_add_systemd_config --service=rustdeskrelay --template=rustdeskrelay.service
ynh_add_systemd_config --service=rustdesksignal --template=rustdesksignal.service
@ -52,18 +50,6 @@ ynh_add_systemd_config --service=rustdesksignal --template=rustdesksignal.servic
yunohost service add rustdeskrelay --description="Rustdesk Relay Server" --log="/var/log/$app/$app.log"
yunohost service add rustdesksignal --description="Rustdesk Signal Server" --log="/var/log/$app/$app.log"
#=================================================
# RECONFIGURE THE APP (UPDATE CONF, APPLY MIGRATIONS...)
#=================================================
# UPDATE A CONFIG FILE
#=================================================
#ynh_script_progression --message="Updating a configuration file..." --weight=1
#ynh_add_config --template="some_config_file" --destination="$install_dir/some_config_file"
#chmod 400 "$install_dir/some_config_file"
#chown $app:$app "$install_dir/some_config_file"
#=================================================
# START SYSTEMD SERVICE
#=================================================