Thu, 04 Oct 2012 20:30:05 +0200
Correct out of date build configuration, porting to Solaris 11 network
link infrastructure and new libpcap logic. This additionally allows for
device drivers in subdirectories of /dev. Correct packaged nmap
personalities and signatures to work out of the box. Finally, hack
arpd logic to properly close sockets and quit on TERM by repeating
signaling in the run command script. Sadly, all this fails to correct
the run time behaviour of honeyd which fails to bind to the IP layer.
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