head 1.1; access; symbols OPENPKG_E1_MP:1.1 OPENPKG_E1_MP_HEAD:1.1; locks; strict; comment @# @; 1.1 date 2006.12.25.10.16.23; author rse; state Exp; branches; next ; commitid TLpeAohQIOklfTZr; desc @@ 1.1 log @new package: phpbb 3.0.B4 (Web Bulletin Board System (BBS)) @ text @#!@@l_prefix@@/bin/openpkg rc ## ## rc.phpbb -- Run-Commands ## %config phpbb_enable="$openpkg_rc_def" %common phpbb_cfgfile="@@l_prefix@@/etc/phpbb/phpbb-apache.conf" phpbb_pidfile="@@l_prefix@@/var/phpbb/run/apache.pid" phpbb_signal () { [ -f $phpbb_pidfile ] && kill -$1 `cat $phpbb_pidfile` } %status -u @@l_susr@@ -o phpbb_usable="no" phpbb_active="no" @@l_prefix@@/sbin/apache -t -f $phpbb_cfgfile 2>/dev/null && \ phpbb_usable="yes" phpbb_signal 0 && \ phpbb_active="yes" echo "phpbb_enable=\"$phpbb_enable\"" echo "phpbb_usable=\"$phpbb_usable\"" echo "phpbb_active=\"$phpbb_active\"" %start -u @@l_susr@@ rcService phpbb enable yes || exit 0 rcService phpbb active yes && exit 0 ( export PATH="@@l_path@@" @@l_prefix@@/sbin/apache -f $phpbb_cfgfile ) || exit $? %stop -u @@l_susr@@ rcService phpbb enable yes || exit 0 rcService phpbb active no && exit 0 phpbb_signal TERM sleep 2 rm -f $phpbb_pidfile >/dev/null 2>&1 || true %restart -u @@l_susr@@ rcService phpbb enable yes || exit 0 rcService phpbb active no && exit 0 rc phpbb stop start @