The script in the manual is for CentOS and does not work well on Ubuntu.
Has anyone done one for Ubuntu 16.04?
Thanks,
#!/bin/sh
# chkconfig: 2345 99 01
# description: SoftEther VPN Server
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
exit 0
Startup Script for vpnserver on Ubuntu 16.04
-
- Posts: 202
- Joined: Wed Jul 10, 2013 2:07 pm
Re: Startup Script for vpnserver on Ubuntu 16.04
I use a "quick & dirty" systemd service.
(to activate: "sudo systemctl enable vpn" to start once: "sudo systemctl start vpn")
qupfer@vpnpi:~ $ cat /etc/systemd/system/vpn.service
[Unit]
Description=SoftEther VPN Server daemon
After=network.target
[Service]
Type=forking
ExecStart=/usr/bin/vpnserver start
ExecStop=/usr/bin/vpnserver stop
[Install]
WantedBy=multi-user.target
(to activate: "sudo systemctl enable vpn" to start once: "sudo systemctl start vpn")
qupfer@vpnpi:~ $ cat /etc/systemd/system/vpn.service
[Unit]
Description=SoftEther VPN Server daemon
After=network.target
[Service]
Type=forking
ExecStart=/usr/bin/vpnserver start
ExecStop=/usr/bin/vpnserver stop
[Install]
WantedBy=multi-user.target
-
- Posts: 102
- Joined: Sat Jun 20, 2015 9:40 am
Re: Startup Script for vpnserver on Ubuntu 16.04
Thanks,
I tried to fix this by adding:
### BEGIN INIT INFO
# Provides: vpnserver
# Required-Start:
# Required-Stop:
# Should-Start:
# Should-Stop:
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Start and Stop
# Description:
### END INIT INFO
but managed to break it by doing so..... and now I cant reach the server. Have to go there...
I tried to fix this by adding:
### BEGIN INIT INFO
# Provides: vpnserver
# Required-Start:
# Required-Stop:
# Should-Start:
# Should-Stop:
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Start and Stop
# Description:
### END INIT INFO
but managed to break it by doing so..... and now I cant reach the server. Have to go there...