Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- nano /etc/init.d/vpnserver
- ## isi dengan script dibawah ini
- **************
- #!/bin/sh
- ### BEGIN INIT INFO
- # Provides: vpnserver
- # Required-Start: $remote_fs $syslog
- # Required-Stop: $remote_fs $syslog
- # Default-Start: 2 3 4 5
- # Default-Stop: 0 1 6
- # Short-Description: Start daemon at boot time
- # Description: Enable Softether by daemon.
- ### END INIT INFO
- 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
- **************
- chmod a+x /etc/init.d/vpnserver
- mkdir -p /var/lock/subsys/vpnserver
- update-rc.d vpnserver defaults
- /etc/init.d/vpnserver start
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement