Has anyone been able to get the vpnclient to autostart on Ubuntu 14.04 and up? Chkconfig is no longer used and is broken and apparently Ubuntu uses update-rc.d to enable servies at boot time. I am using a modified script from the vpnserver config as shown below:
------------------------------------------------------------------------------------------------------------------------------------------
#!/bin/sh
# chkconfig: 2345 99 01
# description: SoftEther VPN Client
DAEMON=/usr/local/vpnclient/vpnclient
LOCK=/var/lock/subsys/vpnclient
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
------------------------------------------------------------------------------------------------------------------------------------------
However, I receive the following error messages when trying to use "update-rc.d vpnclient defaults":
insserv: warning: script 'vpnclient' missing LSB tags and overrides
Linux Client Boot Configuration
-
- Posts: 2458
- Joined: Mon Feb 24, 2014 11:03 am
Re: Linux Client Boot Configuration
Is there any actual problem?
-
- Posts: 9
- Joined: Thu Aug 06, 2015 3:57 pm
Re: Linux Client Boot Configuration
I don't know how to add the LSB tags and overrides.
-
- Posts: 223
- Joined: Fri Jul 03, 2015 2:21 pm
Re: Linux Client Boot Configuration
It's a warning not an error
-
- Posts: 9
- Joined: Thu Jan 15, 2015 10:46 am
Re: Linux Client Boot Configuration
I simply use the script as follows (see http://xmodulo.com/how-to-automatically ... ebian.html) assuming that vpnclient is unzipped under /home/USER/vpnclient. Note that the connection must be configured as "startupset" by vpncmd in advance.
#! /bin/sh
# /etc/init.d/foobar
# The following part always gets executed.
echo "This part always gets executed"
# The following part carries out specific functions depending on arguments.
case "$1" in
start)
echo "Starting foobar"
sudo /home/USER/vpnclient/vpnclient start
sleep 2
sudo dhclient vpn_vnic
echo "foobar is alive"
;;
stop)
echo "Stopping foobar"
sudo /home/USER/vpnclient/vpnclient stop
echo "foobar is dead"
;;
*)
echo "Usage: /etc/init.d/foobar {start|stop}"
exit 1
;;
esac
exit 0
#! /bin/sh
# /etc/init.d/foobar
# The following part always gets executed.
echo "This part always gets executed"
# The following part carries out specific functions depending on arguments.
case "$1" in
start)
echo "Starting foobar"
sudo /home/USER/vpnclient/vpnclient start
sleep 2
sudo dhclient vpn_vnic
echo "foobar is alive"
;;
stop)
echo "Stopping foobar"
sudo /home/USER/vpnclient/vpnclient stop
echo "foobar is dead"
;;
*)
echo "Usage: /etc/init.d/foobar {start|stop}"
exit 1
;;
esac
exit 0