Page 1 of 1
autostartup vpnservice to debian 10
Posted: Sat Oct 23, 2021 10:48 pm
by sergey113
Hi
How do I set up vpnservice autorun in debian 10?
I read the wiki. Created a script in
, launched
.
But the service does not start when the OS starts.
Works.
does not work.
Re: autostartup vpnservice to debian 10
Posted: Mon Oct 25, 2021 10:49 pm
by solo
On my Linux Mint Iauto-start SE with...
Code: Select all
cat >> /lib/systemd/system/vpnserver.service << EOF
[Unit]
Description=SoftEther VPN Server
After=network.target
[Service]
Type=forking
ExecStart=/usr/local/vpnserver/vpnserver start
ExecStop=/usr/local/vpnserver/vpnserver stop
[Install]
WantedBy=multi-user.target
EOF
and:
systemctl enable vpnserver
As Linux Mint is derived from Ubuntu which is derived from Debian, it should work for you too.
Re: autostartup vpnservice to debian 10
Posted: Thu Jan 20, 2022 10:38 pm
by PH-IT
# nano /lib/systemd/system/vpnserver.service
[Unit]
Description=SoftEther VPN Server
After=network.target
[Service]
Type=forking
ExecStart=/usr/local/vpnserver/vpnserver start
ExecStop=/usr/local/vpnserver/vpnserver stop
ExecReload=/bin/kill -HUP $MAINPID
Restart=on-failure
RestartSec=10
[Install]
WantedBy=multi-user.target
# systemctl enable vpnserver.service <---- you have to enable it
Re: autostartup vpnservice to debian 10
Posted: Sun Nov 06, 2022 6:29 pm
by sergey113
Thanks very much!!!
It`s work too.
create file (as root user)
nano /lib/systemd/system/vpnserver.service
with
-->>
### BEGIN INIT INFO
# Provides: vpnserver
# Required-Start: $all
# Required-Stop:
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: VPN vpnserver
# Description: Service VPN vpnserver
### END INIT INFO
[Unit]
Description=SoftEther VPN Server
After=network.target
[Service]
Type=forking
ExecStart=/usr/local/vpnserver/vpnserver start
ExecStop=/usr/local/vpnserver/vpnserver stop
[Install]
WantedBy=multi-user.target
-->>