summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOmar Vega Ramos <ovruni@gnu.org.pe>2013-02-18 17:31:52 -0500
committerOmar Vega Ramos <ovruni@gnu.org.pe>2013-02-18 17:31:52 -0500
commit0be78807ac1a050c88f847ef0e36f5cd4d9b5725 (patch)
treeba2266308391192112ed3a843f144a2d33d59d97
parent4d8ea59baa9963ebbca29b35c9a7ceb914119376 (diff)
downloadabslibre-0be78807ac1a050c88f847ef0e36f5cd4d9b5725.tar.gz
abslibre-0be78807ac1a050c88f847ef0e36f5cd4d9b5725.tar.bz2
abslibre-0be78807ac1a050c88f847ef0e36f5cd4d9b5725.zip
Adding packages to pcr
-rw-r--r--pcr/ahcpd/PKGBUILD27
-rw-r--r--pcr/babeld/PKGBUILD32
-rw-r--r--pcr/babeld/babeld.install18
-rw-r--r--pcr/batctl/PKGBUILD25
-rw-r--r--pcr/dropbear/PKGBUILD46
-rw-r--r--pcr/dropbear/dropbear-conf.d15
-rw-r--r--pcr/dropbear/dropbear-rc.d88
-rw-r--r--pcr/ffingerd/PKGBUILD27
-rw-r--r--pcr/ffingerd/finger.xinetd8
-rw-r--r--pcr/inadyn-opendns/PKGBUILD32
-rw-r--r--pcr/inadyn-opendns/inadyn-opendns.install17
-rw-r--r--pcr/inadyn-opendns/inadyn.rc-script38
-rw-r--r--pcr/inspircd/PKGBUILD68
-rw-r--r--pcr/inspircd/inspircd.install15
-rw-r--r--pcr/inspircd/inspircd.rcd54
-rw-r--r--pcr/inspircd/inspircd.service17
16 files changed, 527 insertions, 0 deletions
diff --git a/pcr/ahcpd/PKGBUILD b/pcr/ahcpd/PKGBUILD
new file mode 100644
index 000000000..52c917bbc
--- /dev/null
+++ b/pcr/ahcpd/PKGBUILD
@@ -0,0 +1,27 @@
+# Maintainer: Yann Lopez <arch at lonewulf dot net>
+pkgname=ahcpd
+pkgver=0.53
+pkgrel=2
+pkgdesc="Ad-Hoc Configuration Protocol"
+arch=(i686 x86_64 mips64el)
+url="http://www.pps.jussieu.fr/~jch/software/ahcp/"
+license=('custom')
+depends=('sh')
+source=(http://www.pps.jussieu.fr/~jch/software/files/$pkgname-$pkgver.tar.gz)
+
+build() {
+ cd "$srcdir/$pkgname-$pkgver"
+
+ sed -i 's/\$(PREFIX)\/man/$(PREFIX)\/share\/man/g' Makefile
+ make PREFIX="/usr"
+}
+
+package() {
+ cd "$srcdir/$pkgname-$pkgver"
+
+ make install TARGET=${pkgdir} PREFIX=/usr
+
+ install -d $pkgdir/usr/share/licenses/ahcpd
+ install -m 644 LICENCE $pkgdir/usr/share/licenses/ahcpd/
+}
+md5sums=('a1a610bf20965aa522cd766bf3d5829a')
diff --git a/pcr/babeld/PKGBUILD b/pcr/babeld/PKGBUILD
new file mode 100644
index 000000000..dd132dd35
--- /dev/null
+++ b/pcr/babeld/PKGBUILD
@@ -0,0 +1,32 @@
+# Maintainer (AUR): Yann Lopez <arch at lonewulf dot net>
+# Maintainer (Parabola): fauno <fauno@parabola.nu>
+pkgname=babeld
+pkgver=1.3.4
+pkgrel=2
+pkgdesc="Loop-free distance-vector routing protocol"
+arch=(i686 x86_64 mips64el)
+url="http://www.pps.jussieu.fr/~jch/software/babel/"
+license=('custom')
+depends=(glibc)
+source=(http://www.pps.jussieu.fr/~jch/software/files/$pkgname-$pkgver.tar.gz{,.asc})
+install=babeld.install
+md5sums=('37be1cbcc23cd00ee47efc9157c58795'
+ 'e2dfae49b497ba70c0c1014feae80f3a')
+
+build() {
+ cd "$srcdir/$pkgname-$pkgver"
+
+ sed -e "s,/man/,/share&,g" -i Makefile
+
+ make PREFIX=/usr CFLAGS="$CFLAGS"
+}
+
+package() {
+ cd "$srcdir/$pkgname-$pkgver"
+
+ make PREFIX=/usr TARGET=$pkgdir install
+
+ gzip -f $pkgdir/usr/share/man/man8/$pkgname.8
+
+ install -Dm 644 LICENCE $pkgdir/usr/share/licenses/$pkgname/LICENCE
+}
diff --git a/pcr/babeld/babeld.install b/pcr/babeld/babeld.install
new file mode 100644
index 000000000..686153617
--- /dev/null
+++ b/pcr/babeld/babeld.install
@@ -0,0 +1,18 @@
+compatibility_warning() {
+ echo "PLEASE NOTE:"
+ echo " "
+ echo "-------------------------------------------------------------"
+ echo " This version uses the IANA-allocated UDP port and multicast"
+ echo " group and is therefore incompatible with older versions."
+ echo "-------------------------------------------------------------"
+}
+
+post_upgrade() {
+ major=$(echo $2 | cut -d '.' -f1)
+ minor=$(echo $2 | cut -d '.' -f2)
+ if [ $major -lt 1 ]; then
+ compatibility_warning
+ elif [ $major -eq 1 -a $minor -lt 1 ]; then
+ compatibility_warning
+ fi
+}
diff --git a/pcr/batctl/PKGBUILD b/pcr/batctl/PKGBUILD
new file mode 100644
index 000000000..521537a50
--- /dev/null
+++ b/pcr/batctl/PKGBUILD
@@ -0,0 +1,25 @@
+# Contributor: Nathan Owe <ndowens.aur at gmail dot com>
+# Maintainer: Thomas Weißschuh <thomas_weissschuh@lavabit.com>
+pkgname=batctl
+pkgver=2012.3.0
+pkgrel=2
+pkgdesc="B.A.T.M.A.N. advanced control and management tool"
+arch=('i686' 'x86_64' 'mips64el')
+url="http://www.open-mesh.net/"
+license=('GPL')
+depends=('glibc')
+source=("http://downloads.open-mesh.net/batman/releases/batman-adv-${pkgver}/${pkgname}-${pkgver}.tar.gz"{,.asc})
+
+build(){
+ cd ${srcdir}/${pkgname}-${pkgver}
+ make
+}
+package() {
+ cd ${srcdir}/${pkgname}-${pkgver}
+ make DESTDIR=${pkgdir} PREFIX=/usr install
+
+}
+
+# vim:set ts=2 sw=2 et:
+md5sums=('fe9e6a3994539037b48afc5e3d31628c'
+ 'fdc6433ebc7fe59ce9eaec56dd843eb9')
diff --git a/pcr/dropbear/PKGBUILD b/pcr/dropbear/PKGBUILD
new file mode 100644
index 000000000..1e50534a3
--- /dev/null
+++ b/pcr/dropbear/PKGBUILD
@@ -0,0 +1,46 @@
+# Maintainer: Jaroslav Lichtblau <dragonlord@aur.archlinux.org>
+# Contributor: Jason Pierce <`echo 'moc tod liamg ta nosaj tod ecreip' | rev`>
+# Contributor: Jeremy Cowgar <jeremy@cowgar.com>
+
+pkgname=dropbear
+pkgver=0.53.1
+pkgrel=2
+pkgdesc="Lightweight replacement for sshd"
+arch=('i686' 'x86_64' 'mips64el')
+url="http://matt.ucc.asn.au/dropbear/dropbear.html"
+license=('custom:BSD' 'custom:PD')
+depends=('zlib')
+source=(http://matt.ucc.asn.au/$pkgname/releases/$pkgname-$pkgver.tar.bz2 \
+ $pkgname-conf.d \
+ $pkgname-rc.d)
+sha256sums=('e24d3cbecd3bc850b2b336b8eb50c845a285ceef8e22544938a582e163d36393'
+ 'eaec8cecae4476a660351ba9079c91b7c379146a22df881bd24b81af8f50d74c'
+ '29ab5438d15bfa727620fc04ec52ff55d676577b903c9261ce00bb291ae171a8')
+
+build() {
+ cd ${srcdir}/$pkgname-$pkgver
+
+ sed -i 's:usr/libexec/sftp:usr/lib/ssh/sftp:' options.h
+
+ ./configure --prefix=/usr
+ LIBS="-lcrypt" make
+}
+
+package() {
+ cd ${srcdir}/$pkgname-$pkgver
+
+ make prefix=${pkgdir}/usr install
+
+#man pages
+ install -D -m644 dbclient.1 ${pkgdir}/usr/share/man/man1/dbclient.1
+ install -D -m644 $pkgname.8 ${pkgdir}/usr/share/man/man8/$pkgname.8
+ install -D -m644 dropbearkey.8 ${pkgdir}/usr/share/man/man8/dropbearkey.8
+
+#configuration files
+ install -d ${pkgdir}/etc/$pkgname
+ install -D -m644 ${srcdir}/$pkgname-conf.d ${pkgdir}/etc/conf.d/$pkgname
+ install -D -m755 ${srcdir}/$pkgname-rc.d ${pkgdir}/etc/rc.d/$pkgname
+
+#license file
+ install -D -m644 LICENSE ${pkgdir}/usr/share/licenses/$pkgname/LICENSE
+}
diff --git a/pcr/dropbear/dropbear-conf.d b/pcr/dropbear/dropbear-conf.d
new file mode 100644
index 000000000..6f3b8f0c5
--- /dev/null
+++ b/pcr/dropbear/dropbear-conf.d
@@ -0,0 +1,15 @@
+# the TCP port that Dropbear listens on
+DROPBEAR_PORT="127.0.0.1:22" # Default to local-only.
+
+# any additional arguments for Dropbear
+DROPBEAR_EXTRA_ARGS="-w" # Default to no-root logins.
+
+# specify an optional banner file containing a message to be
+# sent to clients before they connect, such as "/etc/issue.net"
+DROPBEAR_BANNER=""
+
+# RSA hostkey file (default: /etc/dropbear/dropbear_rsa_host_key)
+#DROPBEAR_RSAKEY="/etc/dropbear/dropbear_rsa_host_key"
+
+# DSS hostkey file (default: /etc/dropbear/dropbear_dss_host_key)
+DROPBEAR_DSSKEY="/etc/dropbear/dropbear_dss_host_key"
diff --git a/pcr/dropbear/dropbear-rc.d b/pcr/dropbear/dropbear-rc.d
new file mode 100644
index 000000000..011880b3b
--- /dev/null
+++ b/pcr/dropbear/dropbear-rc.d
@@ -0,0 +1,88 @@
+#!/bin/bash
+daemon_name=dropbear
+
+. /etc/rc.conf
+. /etc/rc.d/functions
+
+. /etc/conf.d/$daemon_name
+
+for port in $DROPBEAR_PORT; do
+ daemon_args="$daemon_args -p $port"
+done
+
+[ ! -z $DROPBEAR_BANNER ] && daemon_args="$daemon_args -b $DROPBEAR_BANNER"
+[ ! -z $DROPBEAR_DSSKEY ] && daemon_args="$daemon_args -d $DROPBEAR_DSSKEY"
+[ ! -z $DROPBEAR_RSAKEY ] && daemon_args="$daemon_args -r $DROPBEAR_RSAKEY"
+[ ! -z $DROPBEAR_EXTRA_ARGS ] && daemon_args="$daemon_args $DROPBEAR_EXTRA_ARGS"
+[ -z $DROPBEAR_PIDFILE ] && DROPBEAR_PIDFILE="/var/run/$daemon_name.pid"
+daemon_args="$daemon_args -P $DROPBEAR_PIDFILE"
+
+get_pid() {
+ PID=''
+ if [ -r $DROPBEAR_PIDFILE -a -f $DROPBEAR_PIDFILE -a -w $DROPBEAR_PIDFILE ]; then
+ if kill -0 "`< $DROPBEAR_PIDFILE`" &>/dev/null; then # kill -0 == "exit code indicates if a signal may be sent"
+ PID="`< $DROPBEAR_PIDFILE`"
+ else # may not send signals to dropbear, because it's probably not running => remove pidfile
+ rm -f $DROPBEAR_PIDFILE
+ fi
+ fi
+}
+
+case "$1" in
+ start)
+ stat_busy "Starting $daemon_name"
+ get_pid
+ if [ -z "$PID" ]; then
+ printhl "Checking for hostkeys"
+ if [ ! -z $DROPBEAR_DSSKEY ]; then
+ [ ! -f $DROPBEAR_DSSKEY ] && dropbearkey -t dss -f $DROPBEAR_DSSKEY
+ fi;
+ if [ ! -z $DROPBEAR_RSAKEY ]; then
+ [ ! -f $DROPBEAR_RSAKEY ] && dropbearkey -t rsa -f $DROPBEAR_RSAKEY
+ fi;
+
+ $daemon_name $daemon_args # Make it Go Joe!
+ if [ $? -gt 0 ]; then
+ stat_die
+ else
+ add_daemon $daemon_name
+ stat_done
+ fi
+ else
+ stat_die
+ fi
+ ;;
+
+ stop)
+ stat_busy "Stopping $daemon_name"
+
+ get_pid
+ [ ! -z "$PID" ] && kill $PID &> /dev/null # Be dead (please), I say!
+ if [ $? -gt 0 ]; then
+ stat_die
+ else
+ rm_daemon $daemon_name
+ stat_done
+ fi
+ ;;
+
+ restart)
+ $0 stop
+ sleep 3
+ $0 start
+ ;;
+
+ fingerprint)
+ stat_busy "Fingerprinting $daemon_name hostkeys"
+ if [ ! -z $DROPBEAR_DSSKEY ]; then
+ printhl "DSS/DSA Key $(dropbearkey -y -f $DROPBEAR_DSSKEY | grep Fingerprint)"
+ fi;
+ if [ ! -z $DROPBEAR_RSAKEY ]; then
+ printhl "RSA Key $(dropbearkey -y -f $DROPBEAR_RSAKEY | grep Fingerprint)"
+ fi;
+ ;;
+
+ *)
+ echo "usage: $0 {start|stop|restart|fingerprint}"
+esac
+exit 0
diff --git a/pcr/ffingerd/PKGBUILD b/pcr/ffingerd/PKGBUILD
new file mode 100644
index 000000000..5b43314d3
--- /dev/null
+++ b/pcr/ffingerd/PKGBUILD
@@ -0,0 +1,27 @@
+pkgname=ffingerd
+pkgver=1.28
+pkgrel=3
+pkgdesc="Secure finger daemon"
+arch=('i686' 'x86_64' 'mips64el')
+url="http://www.fefe.de/ffingerd/"
+license=('GPL2')
+depends=('glibc' 'xinetd')
+backup=('etc/xinetd.d/finger')
+source=(http://www.fefe.de/$pkgname/$pkgname-$pkgver.tar.bz2 finger.xinetd)
+md5sums=('fe207448745da07b4e393d8b8694658b' '2ca1a6b3f442a5c0c81fa03d265a203e')
+
+build() {
+ cd $srcdir/$pkgname-$pkgver
+ install -d $pkgdir/usr/sbin $pkgdir/usr/share/man/man8
+ ./configure --prefix=/usr
+
+ make
+}
+
+package(){
+ cd $srcdir/$pkgname-$pkgver
+
+ make SBINDIR=$pkgdir/usr/sbin MANDIR=$pkgdir/usr/share/man install
+
+ install -D -m644 $srcdir/finger.xinetd $pkgdir/etc/xinetd.d/ffinger
+}
diff --git a/pcr/ffingerd/finger.xinetd b/pcr/ffingerd/finger.xinetd
new file mode 100644
index 000000000..36cd303b4
--- /dev/null
+++ b/pcr/ffingerd/finger.xinetd
@@ -0,0 +1,8 @@
+service finger
+{
+ socket_type = stream
+ wait = no
+ user = nobody
+ server = /usr/sbin/ffingerd
+ disable = yes
+}
diff --git a/pcr/inadyn-opendns/PKGBUILD b/pcr/inadyn-opendns/PKGBUILD
new file mode 100644
index 000000000..37c13d49a
--- /dev/null
+++ b/pcr/inadyn-opendns/PKGBUILD
@@ -0,0 +1,32 @@
+# Contributor: Bug <Bug2000@gmail.com>
+# Maintainer: Bug <Bug2000@gmail.com>
+pkgname=inadyn-opendns
+pkgver=1.99
+pkgrel=4
+pkgdesc="Simple dynamic DNS client with SSL support"
+arch=('i686' 'x86_64' 'mips64el')
+url="http://www.opendns.com/account/dynamic_dns/downloads"
+license=('GPL')
+makedepends=('unzip')
+depends=('curl')
+conflicts=('inadyn')
+provides=('inadyn')
+backup=('etc/inadyn.conf')
+install='inadyn-opendns.install'
+source=("http://www.opendns.com/support/ddns_files/inadyn.source.v$pkgver.zip"
+ 'inadyn.rc-script')
+md5sums=('0f2cf9c3ea3482c03e1c42f8480f1c55'
+ '73c61f9939546c28119242a1e12ffcff')
+
+build() {
+ cd "$srcdir/inadyn.source.v$pkgver"
+
+ make || return 1
+
+ install -Dm755 bin/linux/inadyn $pkgdir/usr/sbin/inadyn
+ install -Dm644 man/inadyn.8 $pkgdir/usr/share/man/man8/inadyn.8
+ install -Dm644 man/inadyn.conf.5 $pkgdir/usr/share/man/man5/inadyn.conf.5
+ install -Dm644 readme.html $pkgdir/usr/share/doc/inadyn/readme.html
+ install -Dm755 $srcdir/inadyn.rc-script $pkgdir/etc/rc.d/inadyn
+ install -Dm644 inadyn.conf $pkgdir/etc/inadyn.conf
+}
diff --git a/pcr/inadyn-opendns/inadyn-opendns.install b/pcr/inadyn-opendns/inadyn-opendns.install
new file mode 100644
index 000000000..e1a842430
--- /dev/null
+++ b/pcr/inadyn-opendns/inadyn-opendns.install
@@ -0,0 +1,17 @@
+post_install() {
+/bin/true
+echo Please remember to change the /etc/inadyn.conf file for your settings.
+}
+
+post_upgrade() {
+/bin/true
+}
+
+pre_remove() {
+/bin/true
+}
+
+op=$1
+shift
+
+$op "$@" \ No newline at end of file
diff --git a/pcr/inadyn-opendns/inadyn.rc-script b/pcr/inadyn-opendns/inadyn.rc-script
new file mode 100644
index 000000000..2ee29d59e
--- /dev/null
+++ b/pcr/inadyn-opendns/inadyn.rc-script
@@ -0,0 +1,38 @@
+#!/bin/bash
+
+. /etc/rc.conf
+. /etc/rc.d/functions
+
+PID=`pidof -o %PPID /usr/sbin/inadyn`
+case "$1" in
+ start)
+ stat_busy "Starting INADYN Daemon"
+ [ -z "$PID" ] && /usr/sbin/inadyn --background --input_file /etc/inadyn.conf >>/var/log/inadyn 2>&1
+ if [ $? -gt 0 ]; then
+ stat_fail
+ else
+ PID=`pidof -o %PPID /usr/sbin/inadyn`
+ echo $PID >/var/run/inadyn.pid
+ add_daemon inadyn
+ stat_done
+ fi
+ ;;
+ stop)
+ stat_busy "Stopping INADYN Daemon"
+ [ ! -z "$PID" ] && kill $PID &>/dev/null
+ if [ $? -gt 0 ]; then
+ stat_fail
+ else
+ rm_daemon inadyn
+ stat_done
+ fi
+ ;;
+ restart)
+ $0 stop
+ $0 start
+ ;;
+ *)
+ echo "usage: $0 {start|stop|restart}"
+esac
+exit 0
+
diff --git a/pcr/inspircd/PKGBUILD b/pcr/inspircd/PKGBUILD
new file mode 100644
index 000000000..3de3d5e57
--- /dev/null
+++ b/pcr/inspircd/PKGBUILD
@@ -0,0 +1,68 @@
+pkgname=inspircd
+pkgver=2.0.8
+pkgrel=2
+pkgdesc='A lightweight IRC daemon'
+arch=('x86_64' 'i686' 'mips64el')
+url='http://www.inspircd.org/'
+license=('GPL2')
+depends=('perl')
+makedepends=('pkg-config' 'libmysqlclient' 'postgresql' 'sqlite3' 'libldap' 'geoip'
+ 'tre' 'gnutls' 'openssl' 'libgcrypt')
+optdepends=('gnutls: m_ssl_gnutls'
+ 'libgcrypt: m_ssl_gnutls'
+ 'openssl: m_ssl_openssl'
+ 'libmysqlclient: m_mysql'
+ 'pcre: m_regex_pcre'
+ 'postgresql: m_pgsql'
+ 'sqlite3: m_sqlite3'
+ 'libldap: m_ldapoper and m_ldapauth'
+ 'geoip: m_geoip'
+ 'tre: m_regex_tre')
+install=inspircd.install
+
+source=(https://github.com/downloads/inspircd/inspircd/InspIRCd-$pkgver.tar.bz2
+ inspircd.rcd inspircd.service)
+sha1sums=('c8bcbc222df40bc8110cefdb4a1fee91ad7c73d1'
+ '59c4aa6929732fb076ca2be96a01385cae9e8484'
+ '667b28d0d086be6daad7a0c2f110c68e6526264e')
+
+build() {
+ cd "${srcdir}/inspircd"
+
+ ./configure \
+ --enable-extras=m_geoip.cpp \
+ --enable-extras=m_ldapauth.cpp \
+ --enable-extras=m_ldapoper.cpp \
+ --enable-extras=m_mysql.cpp \
+ --enable-extras=m_pgsql.cpp \
+ --enable-extras=m_regex_pcre.cpp \
+ --enable-extras=m_regex_posix.cpp \
+ --enable-extras=m_regex_tre.cpp \
+ --enable-extras=m_sqlite3.cpp
+
+ ./configure \
+ --prefix=/usr/lib/inspircd \
+ --binary-dir=/usr/sbin \
+ --module-dir=/usr/lib/inspircd/modules \
+ --config-dir=/etc/inspircd \
+ --enable-gnutls \
+ --enable-openssl \
+ --enable-epoll
+
+ make
+}
+
+package() {
+ install -Dm755 "${srcdir}"/inspircd.rcd "${pkgdir}"/etc/rc.d/inspircd
+ install -Dm644 "${srcdir}"/inspircd.service "${pkgdir}"/usr/lib/systemd/system/inspircd.service
+ install -o141 -g141 -dm750 "${pkgdir}/var/log/inspircd"
+
+ cd "${srcdir}/inspircd"
+ make DESTDIR="$pkgdir" INSTUID=141 install
+
+ mkdir -p "${pkgdir}"/usr/share/inspircd
+ mv "${pkgdir}"/etc/inspircd/examples "${pkgdir}"/usr/share/inspircd/examples
+
+ rm -rf "${pkgdir}"/usr/lib/inspircd/logs
+ rm -rf "${pkgdir}"/usr/lib/inspircd/data
+}
diff --git a/pcr/inspircd/inspircd.install b/pcr/inspircd/inspircd.install
new file mode 100644
index 000000000..ec97113f5
--- /dev/null
+++ b/pcr/inspircd/inspircd.install
@@ -0,0 +1,15 @@
+post_install() {
+ getent group inspircd &>/dev/null || groupadd -r -g 141 inspircd >/dev/null
+ getent passwd inspircd &>/dev/null || useradd -r -u 141 -g inspircd -d /var/lib/inspircd -s /bin/false -c inspircd inspircd >/dev/null
+
+ echo '==> You will need to create a config file for inspircd'
+ echo '==> cp /etc/inspircd/inspircd.conf.example /etc/inspircd/inspircd.conf'
+ echo '==> You will need to change the pidfile. To do this you can insert the following into your config.'
+ echo '==> <pid file="/var/run/inspircd/inspircd.pid">'
+ echo '==> Remember to use absolute paths in your config directory and not relative paths like you would do with a user-based inspircd install.'
+}
+
+post_remove() {
+ getent passwd inspircd &>/dev/null && userdel inspircd >/dev/null
+ getent group inspircd &>/dev/null && groupdel inspircd >/dev/null
+}
diff --git a/pcr/inspircd/inspircd.rcd b/pcr/inspircd/inspircd.rcd
new file mode 100644
index 000000000..5dbd8198e
--- /dev/null
+++ b/pcr/inspircd/inspircd.rcd
@@ -0,0 +1,54 @@
+#!/bin/bash
+
+. /etc/rc.conf
+. /etc/rc.d/functions
+
+get_pid() {
+ pidof /usr/sbin/inspircd
+}
+
+case "$1" in
+ start)
+ stat_busy "Starting inspircd"
+ PID=$(get_pid)
+ if [ -z "$PID" ]; then
+ su -s /bin/sh -c '/usr/sbin/inspircd --logfile /var/log/inspircd/startup.log --config /etc/inspircd/inspircd.conf' 'inspircd' > /dev/null
+ if [ $? -gt 0 ]; then
+ stat_fail
+ exit 1
+ else
+ add_daemon inspircd
+ stat_done
+ fi
+ else
+ stat_fail
+ exit 1
+ fi
+ ;;
+
+ stop)
+ stat_busy "Stopping inspircd"
+ PID=$(get_pid)
+ [ ! -z "$PID" ] && kill $PID
+ if [ $? -gt 0 ]; then
+ stat_fail
+ exit 1
+ else
+ rm_daemon inspircd
+ stat_done
+ fi
+ ;;
+
+ restart)
+ $0 stop
+ $0 start
+ ;;
+
+ rehash|reload)
+ kill -HUP $(get_pid)
+ ;;
+
+ *)
+ echo "usage: $0 {start|stop|restart}"
+esac
+exit 0
diff --git a/pcr/inspircd/inspircd.service b/pcr/inspircd/inspircd.service
new file mode 100644
index 000000000..83230b65c
--- /dev/null
+++ b/pcr/inspircd/inspircd.service
@@ -0,0 +1,17 @@
+[Unit]
+Description=InspIRCd IRC daemon
+Requires=network.target
+After=network.target
+
+[Service]
+Type=forking
+PIDFile=/var/lib/inspircd/inspircd.pid
+ExecStart=/usr/lib/inspircd/inspircd start
+ExecReload=/usr/lib/inspircd/inspircd rehash
+ExecStop=/usr/lib/inspircd/inspircd stop
+Restart=on-failure
+User=inspircd
+Group=inspircd
+
+[Install]
+Alias=ircd.service