I am running Ubuntu 22.04 in a VMware Workstation VM (Host OS is Windows 11 Pro).
I find that I have to manually start the Softether VPN by running "/etc/init.d/vpnserver start".
I tried running "update-rc.d vpnserver defaults" to make it autostart after login to no avail.
Any ideas? Thanks!
SoftEther on Ubuntu 20.04 not auto starting
-
- Posts: 1040
- Joined: Sun Feb 14, 2021 10:31 am
-
- Posts: 32
- Joined: Mon Nov 02, 2015 7:45 am
Re: SoftEther on Ubuntu 20.04 not auto starting
I tried this guide, which shows something similar: https://www.digitalocean.com/community/ ... ter-reboot
However, the problem is when I go enable the service with
It gives me an error:
I tried all 3 variations:
"sudo nano /etc/init.d/vpnserver"
"sudo nano /etc/systemd/system/vpnserver.service"
-- and--
"nano /lib/systemd/system/vpnserver.service"
However, the problem is when I go enable the service with
Code: Select all
sudo systemctl enable vpnserver.service
Code: Select all
update-rc.d: error: vpnserver Default-Start contains no runlevels, aborting
I tried all 3 variations:
"sudo nano /etc/init.d/vpnserver"
Code: Select all
#!/bin/sh
# chkconfig: 2345 99 01
# description: SoftEther VPN Server
sleep 10
DAEMON=/usr/local/vpnserver/vpnserver
LOCK=/var/lock/subsys/vpnserver
test -x $DAEMON || exit 0
case "$1" in
start)
$DAEMON start
touch $LOCK
;;
stop)
$DAEMON stop
rm $LOCK
;;
restart)
$DAEMON stop
sleep 3
$DAEMON start
;;
*)
echo "Usage: $0 {start|stop|restart}"
exit 1
esac
/etc/init.d/vpnserver start
exit 0
"sudo nano /etc/systemd/system/vpnserver.service"
-- and--
"nano /lib/systemd/system/vpnserver.service"
Code: Select all
[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
-
- Posts: 1040
- Joined: Sun Feb 14, 2021 10:31 am
Re: SoftEther on Ubuntu 20.04 not auto starting
Remove whatever you inserted into /etc/init.d and then enable the service.
-
- Posts: 32
- Joined: Mon Nov 02, 2015 7:45 am
-
- Posts: 1040
- Joined: Sun Feb 14, 2021 10:31 am
Re: SoftEther on Ubuntu 20.04 not auto starting
Yes, just delete /etc/init.d/vpnserver
Then, "/lib/systemd/system/vpnserver.service" is already created and all it needs is "systemctl enable vpnserver"
Then, "/lib/systemd/system/vpnserver.service" is already created and all it needs is "systemctl enable vpnserver"
-
- Posts: 32
- Joined: Mon Nov 02, 2015 7:45 am