diff options
Diffstat (limited to 'tenshi')
-rw-r--r-- | tenshi/PKGBUILD | 45 | ||||
-rw-r--r-- | tenshi/tenshi | 62 | ||||
-rw-r--r-- | tenshi/tenshi-conf.d | 2 | ||||
-rw-r--r-- | tenshi/tenshi.install | 42 |
4 files changed, 0 insertions, 151 deletions
diff --git a/tenshi/PKGBUILD b/tenshi/PKGBUILD deleted file mode 100644 index a1ec7eb..0000000 --- a/tenshi/PKGBUILD +++ /dev/null @@ -1,45 +0,0 @@ -# Contributor: Ryan Corder <ryanc@greengrey.org> - -pkgname=tenshi -pkgver=0.9.1 -pkgrel=1 -pkgdesc="real-time log monitor from the Gentoo Linux project" -arch=(i686 x86_64) -license="custom" -depends=('perl') -install="$pkgname.install" -source=(http://dev.inversepath.com/tenshi/$pkgname-$pkgver.tar.gz - 'tenshi' - 'tenshi-conf.d' - 'tenshi.install') -url="http://dev.inversepath.com/trac/tenshi" -md5sums=('17a2f5f72b232b81b01f800e0e932a99' - 'c1de0e9473003f816d79e0dfb3f19a3b' - '947a195840ff67bbd558135e25c94165' - 'b1605a5f5396cf44dca3ae49c327a4e8') - -build() { - cd $startdir - chmod -R og-rwx ./ - - cd ${startdir}/src/$pkgname-$pkgver - - # create retired directories first - mkdir -m 0755 -p $startdir/pkg/usr/sbin || return 1 - mkdir -m 0750 -p $startdir/pkg/var/lib/tenshi || return 1 - mkdir -m 0750 -p $startdir/pkg/etc/tenshi || return 1 - mkdir -m 0755 -p $startdir/pkg/etc/conf.d || return 1 - mkdir -m 0755 -p $startdir/pkg/etc/rc.d || return 1 - - # install tenshi binary - install -m 755 $startdir/src/$pkgname-$pkgver/tenshi $startdir/pkg/usr/sbin || return 1 - - # install config and init file - install -m 640 $startdir/src/$pkgname-$pkgver/tenshi.conf $startdir/pkg/etc/tenshi || return 1 - install -m 644 $startdir/tenshi-conf.d $startdir/pkg/etc/conf.d/tenshi || return 1 - install -m 755 $startdir/tenshi $startdir/pkg/etc/rc.d/tenshi || return 1 - - # install docs and man pages - install -Dm 644 $startdir/src/$pkgname-$pkgver/LICENSE $startdir/pkg/usr/share/licenses/$pkgname/LICENSE || return 1 - install -Dm 644 $startdir/src/$pkgname-$pkgver/tenshi.8 $startdir/pkg/usr/man/man8/tenshi.8 || return 1 -} diff --git a/tenshi/tenshi b/tenshi/tenshi deleted file mode 100644 index 7ea610c..0000000 --- a/tenshi/tenshi +++ /dev/null @@ -1,62 +0,0 @@ -#!/bin/bash - -# source application-specific settings -[ -f /etc/conf.d/tenshi ] && . /etc/conf.d/tenshi - -. /etc/rc.conf -. /etc/rc.d/functions - -PID=`pgrep -f /usr/sbin/tenshi` - -start() { - stat_busy "Starting Tenshi log monitor" - [ -z "$PID" ] && /usr/sbin/tenshi $TENSHI_OPTIONS - if [ $? -gt 0 ]; then - stat_fail - else - add_daemon tenshi - stat_done - fi -} - -stop() { - stat_busy "Stopping Tenshi log monitor" - [ ! -z "$PID" ] && kill $PID - if [ $? -gt 0 ]; then - stat_fail - else - rm -f $TENSHI_PID - rm_daemon tenshi - stat_done - fi -} - -reload() { - stat_busy "Reloading Tenshi log monitor" - [ ! -z "$PID" ] && kill -HUP $PID - if [ $? -gt 0 ]; then - stat_fail - else - stat_done - fi -} - -case "$1" in - start) - start - ;; - stop) - stop - ;; - restart) - # calling 'stop' and 'start' without the $0 fails... - $0 stop - $0 start - ;; - reload) - reload - ;; - *) - echo "usage: $0 {start|stop|restart|reload}" -esac -exit 0 diff --git a/tenshi/tenshi-conf.d b/tenshi/tenshi-conf.d deleted file mode 100644 index 26b87ff..0000000 --- a/tenshi/tenshi-conf.d +++ /dev/null @@ -1,2 +0,0 @@ -TENSHI_PID="/var/lib/tenshi/tenshi.pid" -TENSHI_OPTIONS="-c /etc/tenshi/tenshi.conf -P $TENSHI_PID" diff --git a/tenshi/tenshi.install b/tenshi/tenshi.install deleted file mode 100644 index 270cd64..0000000 --- a/tenshi/tenshi.install +++ /dev/null @@ -1,42 +0,0 @@ -# $Id: $ -# -# Description: post-install script for tenshi -# Contributor: Ryan Corder <ryanc@greengrey.org> -# - -# arg 1: new package version -post_install() { - # create tenshi user - if [ -z "`grep '^tenshi:' /etc/group`" ]; then - groupadd tenshi - fi - if [ -z "`grep '^tenshi:' /etc/passwd`" ]; then - useradd -d /var/lib/tenshi -g tenshi -s /bin/false tenshi - else - usermod -s /bin/false tenshi - fi - - # set more secure permissions on config files, etc - chown -R tenshi:tenshi /etc/tenshi - chmod 640 /etc/tenshi/tenshi.conf - chown -R tenshi:tenshi /var/lib/tenshi - chmod 750 /var/lib/tenshi - chmod -R o-rwx /var/lib/tenshi -} - -# arg 1: new package version -# arg 2: old package version -post_upgrade() { - post_install $1 -} - -# arg 1: old package version -pre_remove() { - userdel tenshi &> /dev/null - groupdel tenshi &> /dev/null -} - -op=$1 -shift - -$op $* |