autostartup vpnservice to debian 10

Post your questions about SoftEther VPN software here. Please answer questions if you can afford.
Post Reply
sergey113
Posts: 10
Joined: Fri Dec 25, 2015 3:44 pm

autostartup vpnservice to debian 10

Post by sergey113 » Sat Oct 23, 2021 10:48 pm

Hi
How do I set up vpnservice autorun in debian 10?
I read the wiki. Created a script in

Code: Select all

/etc/init.d/vpnserver
, launched

Code: Select all

update-rc.d vpnserver defaults
.
But the service does not start when the OS starts.

Code: Select all

systemctl start vpnserver

Code: Select all

systemctl stop vpnserver

Code: Select all

systemctl restart vpnserver
Works.

Code: Select all

systemctl enable vpnserver

does not work.

solo
Posts: 95
Joined: Sun Feb 14, 2021 10:31 am

Re: autostartup vpnservice to debian 10

Post by solo » Mon Oct 25, 2021 10:49 pm

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.

Post Reply