diff --git a/scripts/install b/scripts/install index 23df7d0..b2e656d 100644 --- a/scripts/install +++ b/scripts/install @@ -178,13 +178,21 @@ yunohost service add wg-quick@wg0 --description="WireGuard VPN" --needs_exposed_ yunohost service add wireguard_ui --description="WireGuard UI" #================================================= -# START SYSTEMD SERVICE +# START UI SYSTEMD SERVICE #================================================= -ynh_script_progression --message="Starting a systemd service..." --weight=1 +ynh_script_progression --message="Starting the systemd service for the UI..." --weight=1 # Start a systemd service ynh_systemd_action --service_name=wireguard_ui --action="start" --line_match="http server started" --log_path="systemd" --timeout=30 +#================================================= +# START VPN SYSTEMD SERVICE +#================================================= +ynh_script_progression --message="Starting the systemd service for the VPN..." --weight=1 + +# Start and enable a systemd service +systemctl enable --now wg-quick@wg0 + #================================================= # SETUP SSOWAT #================================================= diff --git a/scripts/restore b/scripts/restore index 1f1f20c..10de44a 100644 --- a/scripts/restore +++ b/scripts/restore @@ -135,12 +135,19 @@ yunohost service add wireguard_ui --description="WireGuard UI" ynh_restore_file --origin_path=$(jq -r ".config_file_path" $final_path/db/server/global_settings.json) --not_mandatory #================================================= -# START SYSTEMD SERVICE +# START UI SYSTEMD SERVICE #================================================= -ynh_script_progression --message="Starting a systemd service..." --weight=1 +ynh_script_progression --message="Starting the systemd service for the UI..." --weight=1 ynh_systemd_action --service_name=wireguard_ui --action="start" --line_match="http server started" --log_path="systemd" --timeout=30 -sleep 5 + +#================================================= +# START VPN SYSTEMD SERVICE +#================================================= +ynh_script_progression --message="Starting the systemd service for the VPN..." --weight=1 + +# Start and enable a systemd service +systemctl enable --now wg-quick@wg0 #================================================= # GENERIC FINALIZATION diff --git a/scripts/upgrade b/scripts/upgrade index 396c6e4..0588d34 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -219,11 +219,18 @@ yunohost service add wireguard_ui --description="WireGuard UI" #================================================= # START SYSTEMD SERVICE #================================================= -ynh_script_progression --message="Starting a systemd service..." --weight=1 +ynh_script_progression --message="Starting the systemd service for the UI..." --weight=1 # Start a systemd service ynh_systemd_action --service_name=wireguard_ui --action="start" --line_match="http server started" --log_path="systemd" --timeout=30 -sleep 5 + +#================================================= +# START VPN SYSTEMD SERVICE +#================================================= +ynh_script_progression --message="Starting the systemd service for the VPN..." --weight=1 + +# Start and enable a systemd service +systemctl enable --now wg-quick@wg0 #================================================= # RELOAD NGINX