commit bd9ae3199a3f0c0fca7b1fdd022a3964e4bc543b
Author: Constantinos Venetsanopoulos <cven@grnet.gr>
Date:   Thu Feb 2 15:34:47 2012 +0200

    Install default and init.d file as `vncauthproxy'
    
    This is done to ensure there is an upgrade path, if package
    `vncauthproxy' is already installed

diff --git a/debian/default b/debian/default
deleted file mode 100644
index d95a123..0000000
--- a/debian/default
+++ /dev/null
@@ -1,2 +0,0 @@
-# set uid/gid
-#CHUID="nobody:nogroup"
diff --git a/debian/init.d b/debian/init.d
deleted file mode 100644
index 6f04b12..0000000
--- a/debian/init.d
+++ /dev/null
@@ -1,70 +0,0 @@
-#!/bin/sh
-
-### BEGIN INIT INFO
-# Provides:		vncauthproxy
-# Required-Start:	$remote_fs $syslog $network
-# Required-Stop:	$remote_fs $syslog
-# Should-Start:		
-# Should-Stop:		
-# Default-Start:	2 3 4 5
-# Default-Stop:		0 1 6
-# Short-Description:	VNC authentication proxy
-# Description:		VNC authentication proxy
-### END INIT INFO
-
-PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
-DAEMON=/usr/sbin/vncauthproxy
-NAME="vncauthproxy"
-DESC="VNC authentication proxy"
-RUNDIR=/var/run/$NAME
-LOGDIR=/var/log/$NAME
-PIDFILE=$RUNDIR/$NAME.pid
-CHUID="nobody:nogroup"
-
-. /lib/lsb/init-functions
-
-test -x $DAEMON || exit 0
-
-DAEMON_OPTS="--pid-file=$PIDFILE"
-
-# Read configuration variable file if it is present
-[ -r /etc/default/$NAME ] && . /etc/default/$NAME
-
-case "$1" in
-  start)
-	mkdir -p $RUNDIR
-	chown $CHUID $RUNDIR $LOGDIR
-	chmod 0755 $RUNDIR $LOGDIR
-
-	if pidofproc -p $PIDFILE $DAEMON > /dev/null; then
-		log_failure_msg "Starting $DESC (already started)"
-		exit 0
-	fi
-	log_daemon_msg "Starting $DESC" "$NAME"
-	start-stop-daemon --start --quiet --pidfile $PIDFILE \
-		--chuid $CHUID \
-		--exec $DAEMON -- $DAEMON_OPTS
-	log_end_msg $?
-	;;
-  stop)
-	log_daemon_msg "Stopping $DESC" "$NAME"
-	start-stop-daemon --stop --quiet --pidfile $PIDFILE
-	case "$?" in
-		0) log_end_msg 0 ;;
-		1) log_progress_msg "(already stopped)"
-		   log_end_msg 0 ;;
-		*) log_end_msg 1 ;;
-	esac
-	;;
-  force-reload|restart)
-	$0 stop
-	$0 start
-	;;
-  status)
-	status_of_proc -p $PIDFILE $BIN $NAME && exit 0 || exit $?
-	;;
-  *)
-	echo "Usage: ${0} {start|stop|restart|force-reload|status}" >&2
-	exit 1
-	;;
-esac
diff --git a/debian/rules b/debian/rules
index 4ff2b05..f8091d2 100755
--- a/debian/rules
+++ b/debian/rules
@@ -10,3 +10,6 @@ override_dh_auto_install:
 	-mv debian/snf-vncauthproxy/usr/bin/vncauthproxy \
 	    debian/snf-vncauthproxy/usr/sbin/vncauthproxy
 	rmdir debian/snf-vncauthproxy/usr/bin
+
+override_dh_installinit:
+	dh_installinit --name=vncauthproxy
diff --git a/debian/vncauthproxy.default b/debian/vncauthproxy.default
new file mode 100644
index 0000000..d95a123
--- /dev/null
+++ b/debian/vncauthproxy.default
@@ -0,0 +1,2 @@
+# set uid/gid
+#CHUID="nobody:nogroup"
diff --git a/debian/vncauthproxy.init b/debian/vncauthproxy.init
new file mode 100644
index 0000000..6f04b12
--- /dev/null
+++ b/debian/vncauthproxy.init
@@ -0,0 +1,70 @@
+#!/bin/sh
+
+### BEGIN INIT INFO
+# Provides:		vncauthproxy
+# Required-Start:	$remote_fs $syslog $network
+# Required-Stop:	$remote_fs $syslog
+# Should-Start:		
+# Should-Stop:		
+# Default-Start:	2 3 4 5
+# Default-Stop:		0 1 6
+# Short-Description:	VNC authentication proxy
+# Description:		VNC authentication proxy
+### END INIT INFO
+
+PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
+DAEMON=/usr/sbin/vncauthproxy
+NAME="vncauthproxy"
+DESC="VNC authentication proxy"
+RUNDIR=/var/run/$NAME
+LOGDIR=/var/log/$NAME
+PIDFILE=$RUNDIR/$NAME.pid
+CHUID="nobody:nogroup"
+
+. /lib/lsb/init-functions
+
+test -x $DAEMON || exit 0
+
+DAEMON_OPTS="--pid-file=$PIDFILE"
+
+# Read configuration variable file if it is present
+[ -r /etc/default/$NAME ] && . /etc/default/$NAME
+
+case "$1" in
+  start)
+	mkdir -p $RUNDIR
+	chown $CHUID $RUNDIR $LOGDIR
+	chmod 0755 $RUNDIR $LOGDIR
+
+	if pidofproc -p $PIDFILE $DAEMON > /dev/null; then
+		log_failure_msg "Starting $DESC (already started)"
+		exit 0
+	fi
+	log_daemon_msg "Starting $DESC" "$NAME"
+	start-stop-daemon --start --quiet --pidfile $PIDFILE \
+		--chuid $CHUID \
+		--exec $DAEMON -- $DAEMON_OPTS
+	log_end_msg $?
+	;;
+  stop)
+	log_daemon_msg "Stopping $DESC" "$NAME"
+	start-stop-daemon --stop --quiet --pidfile $PIDFILE
+	case "$?" in
+		0) log_end_msg 0 ;;
+		1) log_progress_msg "(already stopped)"
+		   log_end_msg 0 ;;
+		*) log_end_msg 1 ;;
+	esac
+	;;
+  force-reload|restart)
+	$0 stop
+	$0 start
+	;;
+  status)
+	status_of_proc -p $PIDFILE $BIN $NAME && exit 0 || exit $?
+	;;
+  *)
+	echo "Usage: ${0} {start|stop|restart|force-reload|status}" >&2
+	exit 1
+	;;
+esac
