You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
66 lines
2.3 KiB
66 lines
2.3 KiB
#!@l_prefix@/bin/openpkg rc |
|
## |
|
## rc.phabricator -- Run-Commands |
|
## |
|
|
|
%config |
|
phabricator_enable="$openpkg_rc_def" |
|
phabricator_log_rotsteps="10" |
|
phabricator_log_rotminsize="10M" |
|
phabricator_log_rotcomplevel="9" |
|
phabricator_log_rotprolog="true" |
|
phabricator_log_rotepilog="true" |
|
|
|
%common |
|
phabricator_cfgfile="@l_prefix@/etc/phabricator/phabricator-apache.conf" |
|
phabricator_pidfile="@l_prefix@/var/phabricator/run/phabricator-apache.pid" |
|
phabricator_logfile="@l_prefix@/var/phabricator/log/phabricator-access.log" |
|
|
|
%status -u @l_rusr@ -o |
|
phabricator_usable="no" |
|
phabricator_active="no" |
|
@l_prefix@/sbin/apache -t -f $phabricator_cfgfile 2>/dev/null && \ |
|
phabricator_usable="yes" |
|
[ -f $phabricator_pidfile ] && \ |
|
kill -0 `cat $phabricator_pidfile` && \ |
|
phabricator_active="yes" |
|
echo "phabricator_enable=\"$phabricator_enable\"" |
|
echo "phabricator_usable=\"$phabricator_usable\"" |
|
echo "phabricator_active=\"$phabricator_active\"" |
|
|
|
%start -u @l_rusr@ |
|
rcService phabricator enable yes || exit 0 |
|
rcService phabricator active yes && exit 0 |
|
( PATH="/bin:/sbin:/usr/bin:/usr/sbin:@l_prefix@/bin:@l_prefix@/sbin:@l_prefix@/libexec/git" |
|
@l_prefix@/sbin/apache -f $phabricator_cfgfile |
|
@l_prefix@/sbin/phabricator-phd start |
|
) || exit $? |
|
|
|
%stop -u @l_rusr@ |
|
rcService phabricator enable yes || exit 0 |
|
rcService phabricator active no && exit 0 |
|
[ -f $phabricator_pidfile ] && \ |
|
kill -TERM `cat $phabricator_pidfile` |
|
sleep 2 |
|
@l_prefix@/sbin/phabricator-phd stop |
|
|
|
%restart -u @l_rusr@ |
|
rcService phabricator enable yes || exit 0 |
|
rcService phabricator active no && exit 0 |
|
rc phabricator stop start |
|
|
|
%reload -u @l_rusr@ |
|
rcService phabricator enable yes || exit 0 |
|
rcService phabricator active no && exit 0 |
|
@l_prefix@/sbin/apache -f $phabricator_cfgfile -k graceful |
|
@l_prefix@/sbin/phabricator-phd restart |
|
|
|
%daily -u @l_rusr@ |
|
rcService phabricator enable yes || exit 0 |
|
shtool rotate -f \ |
|
-n $phabricator_log_rotsteps -s $phabricator_log_rotminsize -d \ |
|
-z $phabricator_log_rotcomplevel -o @l_rusr@ -g @l_rgrp@ -m 644 \ |
|
-P "$phabricator_log_rotprolog" \ |
|
-E "$phabricator_log_rotepilog; rc phabricator reload" \ |
|
$phabricator_logfile |
|
|
|
|