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-12-14 10:39:13 +01:00
parent d35fea0b9f
commit f385cea634
5 changed files with 0 additions and 12 deletions

View file

@ -6,7 +6,6 @@
# IMPORT GENERIC HELPERS
#=================================================
# Keep this path for calling _common.sh inside the execution's context of backup and restore scripts
source ../settings/scripts/_common.sh
source /usr/share/yunohost/helpers

View file

@ -16,7 +16,6 @@ source /usr/share/yunohost/helpers
#=================================================
ynh_script_progression --message="Setting up source files..." --weight=1
# Download, check integrity, uncompress and patch the source from manifest.toml
ynh_setup_source --dest_dir="$install_dir"
chmod -R o-rwx "$install_dir"
@ -29,19 +28,16 @@ chmod +x "$install_dir/hbbs"
#=================================================
ynh_script_progression --message="Adding system configurations related to $app..." --weight=1
# Create a dedicated systemd config
ynh_add_systemd_config --service=rustdeskrelay --template=rustdeskrelay.service
ynh_add_systemd_config --service=rustdesksignal --template=rustdesksignal.service
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"
# 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
#=================================================
@ -51,7 +47,6 @@ ynh_use_logrotate
#=================================================
ynh_script_progression --message="Starting a systemd service..." --weight=1
# Start a systemd service
ynh_systemd_action --service_name=rustdeskrelay --action="start" --log_path="systemd"
ynh_systemd_action --service_name=rustdesksignal --action="start" --log_path="systemd"

View file

@ -16,7 +16,6 @@ source /usr/share/yunohost/helpers
#=================================================
ynh_script_progression --message="Removing system configurations related to $app..." --weight=1
# Remove the service from the list of services known by YunoHost (added from `yunohost service add`)
if ynh_exec_warn_less yunohost service status rustdeskrelay >/dev/null
then
ynh_script_progression --message="Removing rustdeskrelay service integration..." --weight=1
@ -31,10 +30,8 @@ fi
ynh_remove_systemd_config --service=rustdeskrelay
ynh_remove_systemd_config --service=rustdesksignal
# Remove the app-specific logrotate config
ynh_remove_logrotate
# Remove the log files
ynh_secure_remove --file="/var/log/$app"
#=================================================

View file

@ -35,7 +35,6 @@ 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
@ -52,7 +51,6 @@ yunohost service add rustdesksignal --description="Rustdesk Signal Server" --log
#=================================================
ynh_script_progression --message="Reloading NGINX web server and $app's service..." --weight=1
# Typically you only have either $app but not both at the same time...
ynh_systemd_action --service_name=rustdeskrelay --action="start" --log_path="systemd"
ynh_systemd_action --service_name=rustdesksignal --action="start" --log_path="systemd"

View file

@ -29,7 +29,6 @@ if [ "$upgrade_type" == "UPGRADE_APP" ]
then
ynh_script_progression --message="Upgrading source files..." --weight=1
# Download, check integrity, uncompress and patch the source from manifest.toml
ynh_setup_source --dest_dir="$install_dir" --keep="id_ed25519.pub id_ed25519"
fi