Created
April 5, 2012 03:18
-
-
Save glidenote/2307698 to your computer and use it in GitHub Desktop.
/etc/rc.d/init.d/utvpnclient
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
/sbin/ifconfig utvpn_vpn 192.168.100.60 netmask 255.255.255.0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
### BEGIN INIT INFO | |
# Provides: vpnclient | |
# Required-Start: $local_fs $remote_fs $network | |
# X-UnitedLinux-Should-Start: $named $time | |
# Required-Stop: $local_fs $remote_fs $network | |
# X-UnitedLinux-Should-Stop: | |
# Default-Start: 2 3 4 5 | |
# Default-Stop: 0 1 6 | |
# Short-Description: UT-VPN Client | |
# Description: Start the utvpnclient daemon UT-VPN Client | |
# chkconfig: 2345 99 30 | |
### END INIT INFO | |
DAEMON=/usr/bin/utvpnclient | |
LOCK=/var/lock/subsys/utvpnclient | |
test -x $DAEMON || exit 0 | |
case "$1" in | |
start) | |
$DAEMON start | |
touch $LOCK | |
sleep 3 | |
/root/bin/add_route.sh | |
;; | |
stop) | |
$DAEMON stop | |
rm $LOCK | |
;; | |
restart) | |
$0 stop | |
sleep 3 # Adjust according to your env | |
$0 start | |
;; | |
*) | |
echo "Usage: $0 {start|stop|restart}" | |
exit 1 | |
esac | |
exit 0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment