1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/wireguard_ynh.git synced 2024-09-03 20:35:58 +02:00

fix(level 5): remove some inconsistencies

This commit is contained in:
tytan652 2020-12-29 18:07:35 +01:00 committed by tituspijean
parent e88dc07bcc
commit e4f1425180
3 changed files with 8 additions and 4 deletions

View file

@ -176,6 +176,7 @@ ynh_use_logrotate
#=================================================
ynh_script_progression --message="Integrating service in YunoHost..." --time --weight=1
yunohost service add wireguard --description "WireGuard" --needs_exposed_ports $port_wg
yunohost service add wireguard_ui --description "WireGuard UI" --log "/var/log/$app/ui.log"
### Additional options starting with 3.8:

View file

@ -30,6 +30,7 @@ app=$YNH_APP_INSTANCE_NAME
domain=$(ynh_app_setting_get --app=$app --key=domain)
path_url=$(ynh_app_setting_get --app=$app --key=path)
port_wg=$(ynh_app_setting_get --app=$app --key=port_wg)
final_path=$(ynh_app_setting_get --app=$app --key=final_path)
#=================================================
@ -97,7 +98,8 @@ systemctl enable $app.service
#=================================================
ynh_script_progression --message="Integrating service in YunoHost..." --time --weight=1
yunohost service add $app --description "WireGuard UI" --log "/var/log/$app/$app.log"
yunohost service add wireguard --description "WireGuard" --needs_exposed_ports $port_wg
yunohost service add wireguard_ui --description "WireGuard UI" --log "/var/log/$app/ui.log"
#=================================================
# RESTORE VARIOUS FILES
@ -110,7 +112,7 @@ ynh_restore_file --origin_path=$(jq -r ".config_file_path" $final_path/db/server
#=================================================
ynh_script_progression --message="Starting a systemd service..." --time --weight=1
ynh_systemd_action --service_name=$app --action="start" --log_path="/var/log/$app/$app.log"
ynh_systemd_action --service_name=wireguard_ui --action="start" --log_path="/var/log/$app/ui.log"
#=================================================
# RESTORE THE LOGROTATE CONFIGURATION

View file

@ -18,6 +18,7 @@ app=$YNH_APP_INSTANCE_NAME
domain=$(ynh_app_setting_get --app=$app --key=domain)
path_url=$(ynh_app_setting_get --app=$app --key=path)
port_wg=$(ynh_app_setting_get --app=$app --key=port_wg)
final_path=$(ynh_app_setting_get --app=$app --key=final_path)
#=================================================
@ -156,8 +157,8 @@ ynh_use_logrotate --non-append
#=================================================
ynh_script_progression --message="Integrating service in YunoHost..." --time --weight=1
yunohost service add wireguard_ui --description "WireGuard UI" --log "/var/log/$app/$app.log"
yunohost service add wireguard --description "WireGuard" --needs_exposed_ports "$port_wg"
yunohost service add wireguard_ui --description "WireGuard UI" --log "/var/log/$app/ui.log"
#=================================================
# START SYSTEMD SERVICE
@ -165,7 +166,7 @@ yunohost service add wireguard --description "WireGuard" --needs_exposed_ports "
ynh_script_progression --message="Starting a systemd service..." --time --weight=1
# Start a systemd service
ynh_systemd_action --service_name=wireguard_ui --action="start" --log_path="/var/log/$app/$app.log"
ynh_systemd_action --service_name=wireguard_ui --action="start" --log_path="/var/log/$app/ui.log"
#=================================================
# RELOAD NGINX