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.
|
|
|
|
#!@l_prefix@/bin/openpkg rc
|
|
|
|
|
##
|
|
|
|
|
## rc.wordpress -- Run-Commands
|
|
|
|
|
##
|
|
|
|
|
|
|
|
|
|
%config
|
|
|
|
|
wordpress_enable="$openpkg_rc_def"
|
|
|
|
|
wordpress_cron="yes"
|
|
|
|
|
|
|
|
|
|
%common
|
|
|
|
|
wordpress_apache_cfgfile="@l_prefix@/etc/wordpress/wordpress-apache.conf"
|
|
|
|
|
wordpress_apache_pidfile="@l_prefix@/var/wordpress/wordpress-apache.pid"
|
|
|
|
|
|
|
|
|
|
%status -u @l_susr@ -o
|
|
|
|
|
wordpress_usable="no"
|
|
|
|
|
wordpress_active="no"
|
|
|
|
|
@l_prefix@/sbin/apache -t -f $wordpress_apache_cfgfile 2>/dev/null && \
|
|
|
|
|
wordpress_usable="yes"
|
|
|
|
|
[ -f $wordpress_apache_pidfile ] && \
|
|
|
|
|
kill -0 `cat $wordpress_apache_pidfile` && \
|
|
|
|
|
wordpress_active="yes"
|
|
|
|
|
echo "wordpress_enable=\"$wordpress_enable\""
|
|
|
|
|
echo "wordpress_usable=\"$wordpress_usable\""
|
|
|
|
|
echo "wordpress_active=\"$wordpress_active\""
|
|
|
|
|
|
|
|
|
|
%start -u @l_susr@
|
|
|
|
|
rcService wordpress enable yes || exit 0
|
|
|
|
|
rcService wordpress active yes && exit 0
|
|
|
|
|
@l_prefix@/sbin/apache -f $wordpress_apache_cfgfile
|
|
|
|
|
|
|
|
|
|
%stop -u @l_susr@
|
|
|
|
|
rcService wordpress enable yes || exit 0
|
|
|
|
|
rcService wordpress active no && exit 0
|
|
|
|
|
[ -f $wordpress_apache_pidfile ] && \
|
|
|
|
|
kill -TERM `cat $wordpress_apache_pidfile`
|
|
|
|
|
sleep 2
|
|
|
|
|
|
|
|
|
|
%restart -u @l_susr@
|
|
|
|
|
rcService wordpress enable yes || exit 0
|
|
|
|
|
rcService wordpress active no && exit 0
|
|
|
|
|
rc wordpress stop start
|
|
|
|
|
|