Tue, 28 Aug 2012 18:36:35 +0200
Correct the paths of patched scripts, refine password generation,
mitigate fdatasync(2) detection problems, correct dependencies, remove
outdated autoconf components, correct conf file paths and attributes,
complete and correct log file rotation handing, and note warnings
useful for diagnosing builds.
1 #!@l_prefix@/bin/openpkg rc
2 ##
3 ## rc.drupal -- Run-Commands
4 ##
6 %config
7 drupal_enable="$openpkg_rc_def"
8 drupal_cron="@l_drupal_cron@"
9 drupal_backup="daily"
11 %status -u @l_susr@ -o
12 drupal_usable="no"
13 drupal_active="no"
14 @l_prefix@/sbin/apache -t \
15 -f @l_prefix@/etc/drupal/drupal-apache.conf 2>/dev/null && \
16 drupal_usable="yes"
17 [ -f @l_prefix@/var/drupal/run/apache.pid ] && \
18 kill -0 `cat @l_prefix@/var/drupal/run/apache.pid` && \
19 drupal_active="yes"
20 echo "drupal_enable=\"$drupal_enable\""
21 echo "drupal_usable=\"$drupal_usable\""
22 echo "drupal_active=\"$drupal_active\""
24 %start -u @l_susr@
25 rcService drupal enable yes || exit 0
26 rcService drupal active yes && exit 0
27 @l_prefix@/sbin/apache \
28 -f @l_prefix@/etc/drupal/drupal-apache.conf
30 %stop -u @l_susr@
31 rcService drupal enable yes || exit 0
32 rcService drupal active no && exit 0
33 [ -f @l_prefix@/var/drupal/run/apache.pid ] && \
34 kill -TERM `cat @l_prefix@/var/drupal/run/apache.pid`
35 sleep 2
37 %restart -u @l_susr@
38 rcService drupal enable yes || exit 0
39 rcService drupal active no && exit 0
40 rc drupal stop start
42 %quarterly -u @l_rusr@
43 rcService drupal enable yes || exit 0
44 if [ ".$drupal_cron" = .yes ]; then
45 @l_prefix@/sbin/drupal-cron
46 fi
48 %hourly -u @l_rusr@
49 rcService drupal enable yes || exit 0
50 if [ ".$drupal_backup" = .hourly ]; then
51 @l_prefix@/sbin/drupal-setup backup || exit $?
52 fi
54 %daily -u @l_rusr@
55 rcService drupal enable yes || exit 0
56 if [ ".$drupal_backup" = .daily ]; then
57 @l_prefix@/sbin/drupal-setup backup || exit $?
58 fi
60 %weekly -u @l_rusr@
61 rcService drupal enable yes || exit 0
62 if [ ".$drupal_backup" = .weekly ]; then
63 @l_prefix@/sbin/drupal-setup backup || exit $?
64 fi