diff options
author | Dmitry Kozlov <xeb@mail.ru> | 2010-10-15 22:12:28 +0400 |
---|---|---|
committer | Dmitry Kozlov <xeb@mail.ru> | 2010-10-17 19:19:45 +0400 |
commit | ab92d89ca62f3a9e63ae4f8731efcdbd1d0a7202 (patch) | |
tree | d0071d27489056e4beea5e289e28d1d57dc516f1 /contrib | |
parent | d32cf13525153b9bb961a72cded215e9866e78bd (diff) | |
download | accel-ppp-ab92d89ca62f3a9e63ae4f8731efcdbd1d0a7202.tar.gz accel-ppp-ab92d89ca62f3a9e63ae4f8731efcdbd1d0a7202.zip |
added cpack interface to generate deb packages
Diffstat (limited to 'contrib')
-rw-r--r-- | contrib/debian/accel-pptp-default | 5 | ||||
-rwxr-xr-x | contrib/debian/accel-pptp-init | 59 |
2 files changed, 64 insertions, 0 deletions
diff --git a/contrib/debian/accel-pptp-default b/contrib/debian/accel-pptp-default new file mode 100644 index 00000000..50a75c9a --- /dev/null +++ b/contrib/debian/accel-pptp-default @@ -0,0 +1,5 @@ +# Config file for /etc/init.d/accel-pptp + +# Any extra options you want to pass to aceel-pptpd +# on start-up should be put here. +ACCEL_PPTPD_OPTS="-c /etc/accel-pptp.conf" diff --git a/contrib/debian/accel-pptp-init b/contrib/debian/accel-pptp-init new file mode 100755 index 00000000..0f132fde --- /dev/null +++ b/contrib/debian/accel-pptp-init @@ -0,0 +1,59 @@ +#!/bin/sh +# /etc/init.d/accel-pptpd: set up the accel-pptp server +### BEGIN INIT INFO +# Provides: accel-pptp +# Required-Start: $networking +# Required-Stop: $networking +# Default-Start: 2 3 4 5 +# Default-Stop: 1 +### END INIT INFO + +set -e + +PATH=/bin:/usr/bin:/sbin:/usr/sbin + +. /lib/lsb/init-functions + +if test -f /etv/default/accel-pptp; then + . /etc/default/accel-pptp +fi + +if [ -z $ACCEL_PPPTD_OPTS ]; then + ACCEL_PPTPD_OPTS="-c /etc/accel-pptp.conf" +fi + +case "$1" in + start) + log_daemon_msg "Starting accel-pptp server" "accel-pptpd" + if start-stop-daemon --start --quiet --oknodo --exec /usr/sbin/accel-pptpd -- -d -p /var/run/accel-pptpd.pid $ACCEL_PPTPD_OPTS; then + log_end_msg 0 + else + log_end_msg 1 + fi + ;; + restart) + log_daemon_msg "Restarting accel-pptp server" "accel-pptpd" + start-stop-daemon --stop --quiet --oknodo --retry 180 --pidfile /var/run/accel-pptpd.pid + if start-stop-daemon --start --quiet --oknodo --exec /usr/sbin/accel-pptpd -- -d -p /var/run/accel-pptpd.pid $ACCEL_PPTPD_OPTS; then + log_end_msg 0 + else + log_end_msg 1 + fi + ;; + + stop) + log_daemon_msg "Stopping accel-pptp server" "accel-pptpd" + start-stop-daemon --stop --quiet --oknodo --retry 180 --pidfile /var/run/accel-pptpd.pid + log_end_msg 0 + ;; + + status) + do_status + ;; + *) + log_success_msg "Usage: /etc/init.d/accel-pptp {start|stop|status|restart}" + exit 1 + ;; +esac + +exit 0 |