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-10-29 19:22:23 +01:00
parent 4294494b19
commit d052a8f76a
4 changed files with 16 additions and 16 deletions

View file

@ -16,8 +16,8 @@ source /usr/share/yunohost/helpers
#================================================= #=================================================
ynh_script_progression --message="Stopping a systemd service..." --weight=1 ynh_script_progression --message="Stopping a systemd service..." --weight=1
ynh_systemd_action --service_name=rustdesk-server --action="stop" --log_path="/var/log/$app/$app.log" ynh_systemd_action --service_name=rustdesk-server --action="stop" --log_path="systemd"
ynh_systemd_action --service_name=rustdesk-hbbs --action="stop" --log_path="/var/log/$app/$app.log" ynh_systemd_action --service_name=rustdesk-hbbs --action="stop" --log_path="systemd"
#================================================= #=================================================
# MODIFY URL IN NGINX CONF # MODIFY URL IN NGINX CONF
@ -33,8 +33,8 @@ ynh_change_url_nginx_config
#================================================= #=================================================
ynh_script_progression --message="Starting a systemd service..." --weight=1 ynh_script_progression --message="Starting a systemd service..." --weight=1
ynh_systemd_action --service_name=rustdesk-server --action="start" --log_path="/var/log/$app/$app.log" ynh_systemd_action --service_name=rustdesk-server --action="start" --log_path="systemd"
ynh_systemd_action --service_name=rustdesk-hbbs --action="start" --log_path="/var/log/$app/$app.log" ynh_systemd_action --service_name=rustdesk-hbbs --action="start" --log_path="systemd"
#================================================= #=================================================
# END OF SCRIPT # END OF SCRIPT

View file

@ -35,8 +35,8 @@ ynh_add_nginx_config
ynh_add_systemd_config --service=rustdesk-server --template=rustdesk-server.service ynh_add_systemd_config --service=rustdesk-server --template=rustdesk-server.service
ynh_add_systemd_config --service=rustdesk-hbbs --template=rustdesk-hbbs.service ynh_add_systemd_config --service=rustdesk-hbbs --template=rustdesk-hbbs.service
yunohost service add rustdesk-server --description="A short description of the app" --log="/var/log/$app/$app.log" yunohost service add rustdesk-server --description="Remote control alternative for self-hosting" --log="/var/log/$app/$app.log"
yunohost service add rustdesk-hbbs --description="A short description of the app" --log="/var/log/$app/$app.log" yunohost service add rustdesk-hbbs --description="Remote control alternative for self-hosting" --log="/var/log/$app/$app.log"
#================================================= #=================================================
# APP INITIAL CONFIGURATION # APP INITIAL CONFIGURATION
@ -58,8 +58,8 @@ yunohost service add rustdesk-hbbs --description="A short description of the app
ynh_script_progression --message="Starting a systemd service..." --weight=1 ynh_script_progression --message="Starting a systemd service..." --weight=1
# Start a systemd service # Start a systemd service
ynh_systemd_action --service_name=rustdesk-server --action="start" --log_path="/var/log/$app/$app.log" ynh_systemd_action --service_name=rustdesk-server --action="start" --log_path="systemd"
ynh_systemd_action --service_name=rustdesk-hbbs --action="start" --log_path="/var/log/$app/$app.log" ynh_systemd_action --service_name=rustdesk-hbbs --action="start" --log_path="systemd"
#================================================= #=================================================
# END OF SCRIPT # END OF SCRIPT

View file

@ -31,7 +31,7 @@ ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf"
ynh_restore_file --origin_path="/etc/systemd/system/$app.service" ynh_restore_file --origin_path="/etc/systemd/system/$app.service"
systemctl enable $app.service --quiet systemctl enable $app.service --quiet
yunohost service add $app --description="A short description of the app" --log="/var/log/$app/$app.log" yunohost service add $app --description="Remote control alternative for self-hosting" --log="/var/log/$app/$app.log"
#================================================= #=================================================
# GENERIC FINALIZATION # GENERIC FINALIZATION
@ -41,7 +41,7 @@ yunohost service add $app --description="A short description of the app" --log="
ynh_script_progression --message="Reloading NGINX web server and $app's service..." --weight=1 ynh_script_progression --message="Reloading NGINX web server and $app's service..." --weight=1
# Typically you only have either $app or php-fpm but not both at the same time... # Typically you only have either $app or php-fpm but not both at the same time...
ynh_systemd_action --service_name=$app --action="start" --log_path="/var/log/$app/$app.log" ynh_systemd_action --service_name=$app --action="start" --log_path="systemd"
ynh_systemd_action --service_name=nginx --action=reload ynh_systemd_action --service_name=nginx --action=reload

View file

@ -43,26 +43,26 @@ ynh_add_nginx_config
ynh_add_systemd_config ynh_add_systemd_config
yunohost service add $app --description="A short description of the app" --log="/var/log/$app/$app.log" yunohost service add $app --description="Remote control alternative for self-hosting" --log="/var/log/$app/$app.log"
#================================================= #=================================================
# RECONFIGURE THE APP (UPDATE CONF, APPLY MIGRATIONS...) # RECONFIGURE THE APP (UPDATE CONF, APPLY MIGRATIONS...)
#================================================= #=================================================
# UPDATE A CONFIG FILE # UPDATE A CONFIG FILE
#================================================= #=================================================
ynh_script_progression --message="Updating a configuration file..." --weight=1 #ynh_script_progression --message="Updating a configuration file..." --weight=1
ynh_add_config --template="some_config_file" --destination="$install_dir/some_config_file" #ynh_add_config --template="some_config_file" --destination="$install_dir/some_config_file"
chmod 400 "$install_dir/some_config_file" #chmod 400 "$install_dir/some_config_file"
chown $app:$app "$install_dir/some_config_file" #chown $app:$app "$install_dir/some_config_file"
#================================================= #=================================================
# START SYSTEMD SERVICE # START SYSTEMD SERVICE
#================================================= #=================================================
ynh_script_progression --message="Starting a systemd service..." --weight=1 ynh_script_progression --message="Starting a systemd service..." --weight=1
ynh_systemd_action --service_name=$app --action="start" --log_path="/var/log/$app/$app.log" ynh_systemd_action --service_name=$app --action="start" --log_path="systemd"
#================================================= #=================================================
# END OF SCRIPT # END OF SCRIPT