summaryrefslogtreecommitdiff
path: root/community/fssos-nsvs
diff options
context:
space:
mode:
authorroot <root@rshg054.dnsready.net>2013-01-28 00:05:59 -0800
committerroot <root@rshg054.dnsready.net>2013-01-28 00:05:59 -0800
commit1b9f6dc846379470b620b5dbb9d4d7acd1de148c (patch)
tree2305b950a3c94970b05c1a38af473f5cca95af02 /community/fssos-nsvs
parentb9b96ada56ad38df20b1e528a095a1e86ab67a2b (diff)
Mon Jan 28 00:05:59 PST 2013
Diffstat (limited to 'community/fssos-nsvs')
-rw-r--r--community/fssos-nsvs/PKGBUILD33
-rw-r--r--community/fssos-nsvs/fssos-nsvs.install17
-rwxr-xr-xcommunity/fssos-nsvs/nsvsd36
-rw-r--r--community/fssos-nsvs/nsvsd.service8
4 files changed, 94 insertions, 0 deletions
diff --git a/community/fssos-nsvs/PKGBUILD b/community/fssos-nsvs/PKGBUILD
new file mode 100644
index 000000000..c9b4a13e2
--- /dev/null
+++ b/community/fssos-nsvs/PKGBUILD
@@ -0,0 +1,33 @@
+# $Id: PKGBUILD 83140 2013-01-27 16:14:12Z pierre $
+# Maintainer: Dale Blount <dale@archlinux.org>
+
+pkgname=fssos-nsvs
+pkgver=0.5
+pkgrel=9
+pkgdesc="NSVS for FSSOS"
+arch=('i686' 'x86_64')
+url="http://fssos.sourceforge.net/"
+license=('GPL')
+depends=('bash' 'mysql')
+backup=('etc/nsvsd.conf')
+options=('!libtool' '!makeflags')
+install=$pkgname.install
+source=("http://downloads.sourceforge.net/sourceforge/fssos/nsvs-$pkgver.tar.gz"
+ 'nsvsd'
+ 'nsvsd.service')
+
+build() {
+ cd $srcdir/nsvs-$pkgver
+ ./configure --prefix=/usr --sysconfdir=/etc
+ make CFLAGS="${CFLAGS} -D_GNU_SOURCE"
+}
+
+package() {
+ cd $srcdir/nsvs-$pkgver
+ make DESTDIR=$pkgdir install
+ install -D -m755 "$srcdir/nsvsd" "$pkgdir/etc/rc.d/nsvsd"
+ install -D -m644 "$srcdir/nsvsd.service" "$pkgdir/usr/lib/systemd/system/nsvsd.service"
+}
+md5sums=('3f17c2f6339f1a322b712b467023d825'
+ '4dfd9dc0d69b375587e39ab2621d9ea9'
+ '61e970d0704875b1da83cb4e9fc0eef5')
diff --git a/community/fssos-nsvs/fssos-nsvs.install b/community/fssos-nsvs/fssos-nsvs.install
new file mode 100644
index 000000000..253ae64d2
--- /dev/null
+++ b/community/fssos-nsvs/fssos-nsvs.install
@@ -0,0 +1,17 @@
+post_install() {
+ if [ -z "`grep '^nsvsd::' /etc/group`" ]; then
+ groupadd -g 83 nsvsd
+ fi
+ if [ -z "`grep '^nsvsd:' /etc/passwd`" ]; then
+ useradd -u 83 -d /tmp -g nsvsd -s /bin/false nsvsd
+ fi
+}
+
+post_upgrade() {
+ post_install $1
+}
+
+pre_remove() {
+ userdel nsvsd &> /dev/null
+ groupdel nsvsd &> /dev/null
+}
diff --git a/community/fssos-nsvs/nsvsd b/community/fssos-nsvs/nsvsd
new file mode 100755
index 000000000..f9b4845ab
--- /dev/null
+++ b/community/fssos-nsvs/nsvsd
@@ -0,0 +1,36 @@
+#!/bin/bash
+
+# general config
+. /etc/rc.conf
+. /etc/rc.d/functions
+
+case "$1" in
+ start)
+ stat_busy "Starting nsvsd"
+ /usr/sbin/nsvsd -f /etc/nsvsd.conf
+ if [ $? -gt 0 ]; then
+ stat_fail
+ else
+ add_daemon nsvsd
+ stat_done
+ fi
+ ;;
+ stop)
+ stat_busy "Stopping nsvsd"
+ kill `cat /var/run/nsvsd.pid` &>/dev/null
+ rm -f /var/run/nsvsd.pid
+ if [ $? -gt 0 ]; then
+ stat_fail
+ else
+ rm_daemon nsvsd
+ stat_done
+ fi
+ ;;
+ restart)
+ $0 stop
+ sleep 3
+ $0 start
+ ;;
+ *)
+ echo "usage: $0 {start|stop|restart}"
+esac
diff --git a/community/fssos-nsvs/nsvsd.service b/community/fssos-nsvs/nsvsd.service
new file mode 100644
index 000000000..0df5444ab
--- /dev/null
+++ b/community/fssos-nsvs/nsvsd.service
@@ -0,0 +1,8 @@
+[Unit]
+Description=Name Service Via Sockets Daemon
+
+[Service]
+ExecStart=/usr/sbin/nsvsd -f /etc/nsvsd.conf
+
+[Install]
+WantedBy=multi-user.target