about summary refs log tree commit diff
path: root/contrib/Debian/ngircd.init
diff options
context:
space:
mode:
authorAlexander Barton <alex@barton.de>2024-01-19 22:07:38 +0100
committerAlexander Barton <alex@barton.de>2024-01-20 16:43:54 +0100
commit47f9c6d0a0085da2fbcbdae0a9736b79a98cc527 (patch)
tree7b78e62494a00cababe3b6cdb1d80f7fa3976f2f /contrib/Debian/ngircd.init
parentc65c3435e3107846a1995aea166e8241595fffa4 (diff)
downloadngircd-47f9c6d0a0085da2fbcbdae0a9736b79a98cc527.tar.gz
ngircd-47f9c6d0a0085da2fbcbdae0a9736b79a98cc527.zip
Update included Debian package configuration
- Rewrite using current dh_make.
- Standards-Version: 4.6.2.
- No longer build 3 different packages; only build "ngircd" which now
  includes support for IDENT, PAM (disabled in the ngircd.conf installed
  by the package), SSL (OpenSSL), ZLib and IPv6.
- Update package description accordingly.
- No longer install a SysV init file, only install ngircd.service unit.
Diffstat (limited to 'contrib/Debian/ngircd.init')
-rwxr-xr-xcontrib/Debian/ngircd.init176
1 files changed, 0 insertions, 176 deletions
diff --git a/contrib/Debian/ngircd.init b/contrib/Debian/ngircd.init
deleted file mode 100755
index 8127e8fd..00000000
--- a/contrib/Debian/ngircd.init
+++ /dev/null
@@ -1,176 +0,0 @@
-#!/bin/sh
-#
-# ngIRCd start and stop script for Debian-based systems
-# Copyright 2008-2015 Alexander Barton <alex@barton.de>
-#
-
-### BEGIN INIT INFO
-# Provides:		ngircd
-# Required-Start:	$network $remote_fs
-# Required-Stop:	$network $remote_fs
-# Should-Start:		$syslog $named
-# Should-Stop:		$syslog
-# Default-Start:	2 3 4 5
-# Default-Stop:		0 1 6
-# Short-Description:	Next Generation IRC Server
-# Description:		IRC daemon written from scratch
-### END INIT INFO
-
-PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
-DAEMON=/usr/sbin/ngircd
-NAME=ngIRCd
-DESC="IRC daemon"
-PARAMS=""
-STARTTIME=1
-DIETIME=10
-
-test -h "$0" && me=`readlink $0` || me="$0"
-BASENAME=`basename $me`
-
-test -r /etc/default/$BASENAME && . /etc/default/$BASENAME
-
-test -x $DAEMON || exit 5
-
-# LSB compatibility functions that become used if there is no local
-# include file available.
-log_daemon_msg() {
-	echo -n "$*"
-}
-log_end_msg() {
-	[ "$1" = "0" ] && echo "." || echo " failed!"
-}
-log_failure_msg() {
-	echo "$*"
-}
-log_warning_msg() {
-	log_failure_msg "$*"
-}
-
-# Include LSB functions, if available:
-test -r /lib/lsb/init-functions && . /lib/lsb/init-functions
-
-PIDFILE=`$DAEMON $PARAMS -t | tr -d ' ' | grep "^PidFile=" | cut -d'=' -f2`
-[ -n "$PIDFILE" ] || PIDFILE="/var/run/ircd/ngircd.pid"
-
-r=3
-
-Check_Config()
-{
-	# Make sure that the configuration of ngIRCd is valid:
-	$DAEMON $PARAMS --configtest >/dev/null 2>&1
-	[ $? -eq 0 ] && return 0
-	log_end_msg 1
-	log_failure_msg "Configuration of $NAME is not valid, won't (re)start!"
-	log_failure_msg "Run \"$DAEMON --configtest\" and fix it up ..."
-	exit 6
-}
-
-Prepare() {
-	# Make sure the PID file directory exists and is writable:
-	user=`$DAEMON $PARAMS -t|tr -d ' '|grep "^ServerUID="|cut -d'=' -f2`
-	group=`$DAEMON $PARAMS -t|tr -d ' '|grep "^ServerGID="|cut -d'=' -f2`
-	piddir=`dirname "$PIDFILE"`
-	[ -d "$piddir" ] || mkdir -p "$piddir" 2>/dev/null
-	chown "$user:$group" "$piddir" 2>/dev/null
-	[ $? -eq 0 ] && return 0
-	log_end_msg 1
-	log_failure_msg "Failed to prepare '$piddir' for user '$user'!"
-	exit 1
-}
-
-Do_Start() {
-	if Do_Status; then
-		log_end_msg 0
-		log_warning_msg "$NAME seems to be already running, nothing to do."
-		exit 0
-	fi
-	rm -f "$PIDFILE"
-	start-stop-daemon --start \
-		--quiet --exec $DAEMON -- $PARAMS
-	sleep $STARTTIME
-	Do_Status || return 7
-	return 0
-}
-
-Do_Stop() {
-	if ! Do_Status; then
-		log_end_msg 0
-		log_warning_msg "$NAME seems not to be running, nothing to do."
-		exit 0
-	fi
-	Do_ForceStop
-	return $?
-}
-
-Do_ForceStop() {
-	[ -e $PIDFILE ] \
-		&& pidfile="--pidfile $PIDFILE" \
-		|| pidfile=""
-	start-stop-daemon --stop \
-		--quiet --oknodo --exec $DAEMON $pidfile
-	for i in `seq 1 $DIETIME`; do
-		Do_Status || return 0
-		sleep 1
-	done
-	return 1
-}
-
-Do_Reload() {
-	start-stop-daemon --stop --signal 1 --quiet --exec $DAEMON
-	return $?
-}
-
-Do_Status() {
-	[ -e $PIDFILE ] \
-		&& pidfile="--pidfile $PIDFILE" \
-		|| pidfile=""
-	start-stop-daemon --stop \
-		--quiet --signal 0 --exec $DAEMON $pidfile >/dev/null
-	return $?
-}
-
-case "$1" in
-  start)
-	log_daemon_msg "Starting $DESC" "$NAME"
-	Check_Config
-	Prepare
-	Do_Start; r=$?
-	log_end_msg $r
-	;;
-  stop)
-	log_daemon_msg "Stopping $DESC" "$NAME"
-	Do_Stop; r=$?
-	log_end_msg $r
-	;;
-  reload|force-reload)
-	log_daemon_msg "Reloading $DESC" "$NAME"
-	Check_Config
-	Do_Reload; r=$?
-	log_end_msg $r
-	;;
-  restart)
-	log_daemon_msg "Restarting $DESC" "$NAME"
-	Check_Config
-	Prepare
-	Do_ForceStop
-	Do_Start; r=$?
-	log_end_msg $r
-	;;
-  status)
-	log_daemon_msg "Checking for $DESC" "$NAME"
-	Do_Status; r=$?
-	log_end_msg $r
-	;;
-  test)
-	Check_Config
-	echo "Configuration of $DAEMON seems to be ok."; r=0
-	;;
-  *)
-	N=/etc/init.d/$NAME; r=2
-	echo "Usage: $N {start|stop|restart|reload|force-reload|status|test}" >&2
-	;;
-esac
-
-exit $r
-
-# -eof-