Tue, 28 Aug 2012 18:29:30 +0200
Update from Drupal 6.x to 7.x and introduce several new HTML5 themes. Because
many themes from Drupal 6.x have since been abandoned, left unmaintained, or
not ported to Drupal 7.x, this package has changed in size and utility.
michael@182 | 1 | #!@l_prefix@/bin/openpkg rc |
michael@182 | 2 | ## |
michael@182 | 3 | ## rc.proftpd -- Run-Commands |
michael@182 | 4 | ## |
michael@182 | 5 | |
michael@182 | 6 | %config |
michael@182 | 7 | proftpd_enable="$openpkg_rc_def" |
michael@182 | 8 | proftpd_nice="0" |
michael@182 | 9 | proftpd_acc_file="@l_prefix@/var/proftpd/proftpd.access.log" |
michael@182 | 10 | proftpd_acc_prolog="true" |
michael@182 | 11 | proftpd_acc_epilog="true" |
michael@182 | 12 | proftpd_acc_numfiles="10" |
michael@182 | 13 | proftpd_acc_minsize="1M" |
michael@182 | 14 | proftpd_acc_complevel="9" |
michael@182 | 15 | proftpd_auth_file="@l_prefix@/var/proftpd/proftpd.auth.log" |
michael@182 | 16 | proftpd_auth_prolog="true" |
michael@182 | 17 | proftpd_auth_epilog="true" |
michael@182 | 18 | proftpd_auth_numfiles="10" |
michael@182 | 19 | proftpd_auth_minsize="1M" |
michael@182 | 20 | proftpd_auth_complevel="9" |
michael@182 | 21 | proftpd_sys_file="@l_prefix@/var/proftpd/proftpd.system.log" |
michael@182 | 22 | proftpd_sys_prolog="true" |
michael@182 | 23 | proftpd_sys_epilog="true" |
michael@182 | 24 | proftpd_sys_numfiles="10" |
michael@182 | 25 | proftpd_sys_minsize="1M" |
michael@182 | 26 | proftpd_sys_complevel="9" |
michael@182 | 27 | proftpd_xfer_file="@l_prefix@/var/proftpd/proftpd.xfer.log" |
michael@182 | 28 | proftpd_xfer_prolog="true" |
michael@182 | 29 | proftpd_xfer_epilog="true" |
michael@182 | 30 | proftpd_xfer_numfiles="10" |
michael@182 | 31 | proftpd_xfer_minsize="1M" |
michael@182 | 32 | proftpd_xfer_complevel="9" |
michael@182 | 33 | |
michael@182 | 34 | %common |
michael@182 | 35 | proftpd_pidfile="@l_prefix@/var/proftpd/proftpd.pid" |
michael@182 | 36 | proftpd_signal () { |
michael@182 | 37 | [ -f $proftpd_pidfile ] && kill -$1 `cat $proftpd_pidfile` |
michael@182 | 38 | } |
michael@182 | 39 | |
michael@182 | 40 | %status -u @l_susr@ -o |
michael@182 | 41 | proftpd_usable="unknown" |
michael@182 | 42 | proftpd_active="no" |
michael@182 | 43 | rcService proftpd enable yes && \ |
michael@182 | 44 | proftpd_signal 0 && proftpd_active="yes" |
michael@182 | 45 | echo "proftpd_enable=\"$proftpd_enable\"" |
michael@182 | 46 | echo "proftpd_usable=\"$proftpd_usable\"" |
michael@182 | 47 | echo "proftpd_active=\"$proftpd_active\"" |
michael@182 | 48 | |
michael@182 | 49 | %start -u @l_susr@ |
michael@182 | 50 | rcService proftpd enable yes || exit 0 |
michael@182 | 51 | rcService proftpd active yes && exit 0 |
michael@182 | 52 | nice -n $proftpd_nice @l_prefix@/sbin/proftpd |
michael@182 | 53 | |
michael@182 | 54 | %stop -u @l_susr@ |
michael@182 | 55 | rcService proftpd enable yes || exit 0 |
michael@182 | 56 | rcService proftpd active no && exit 0 |
michael@182 | 57 | proftpd_signal TERM |
michael@182 | 58 | sleep 2 |
michael@182 | 59 | |
michael@182 | 60 | %restart -u @l_susr@ |
michael@182 | 61 | rcService proftpd enable yes || exit 0 |
michael@182 | 62 | rcService proftpd active no && exit 0 |
michael@182 | 63 | rc proftpd stop start |
michael@182 | 64 | |
michael@182 | 65 | %reload -u @l_susr@ |
michael@182 | 66 | rcService proftpd enable yes || exit 0 |
michael@182 | 67 | proftpd_signal HUP |
michael@182 | 68 | |
michael@182 | 69 | %daily -u @l_susr@ |
michael@182 | 70 | rcService proftpd enable yes || exit 0 |
michael@182 | 71 | rcTmp -i |
michael@182 | 72 | hintfile=`rcTmp -f -n hint` |
michael@182 | 73 | shtool rotate -f \ |
michael@182 | 74 | -n ${proftpd_acc_numfiles} -s ${proftpd_acc_minsize} -d \ |
michael@182 | 75 | -z ${proftpd_acc_complevel} -m 644 -o @l_susr@ -g @l_mgrp@ \ |
michael@182 | 76 | -P "${proftpd_acc_prolog}" \ |
michael@182 | 77 | -E "${proftpd_acc_epilog}; echo 1 >$hintfile" \ |
michael@182 | 78 | ${proftpd_acc_file} |
michael@182 | 79 | shtool rotate -f \ |
michael@182 | 80 | -n ${proftpd_auth_numfiles} -s ${proftpd_auth_minsize} -d \ |
michael@182 | 81 | -z ${proftpd_auth_complevel} -m 644 -o @l_susr@ -g @l_mgrp@ \ |
michael@182 | 82 | -P "${proftpd_auth_prolog}" \ |
michael@182 | 83 | -E "${proftpd_auth_epilog}; echo 1 >$hintfile" \ |
michael@182 | 84 | ${proftpd_auth_file} |
michael@182 | 85 | shtool rotate -f \ |
michael@182 | 86 | -n ${proftpd_sys_numfiles} -s ${proftpd_sys_minsize} -d \ |
michael@182 | 87 | -z ${proftpd_sys_complevel} -m 644 -o @l_susr@ -g @l_mgrp@ \ |
michael@182 | 88 | -P "${proftpd_sys_prolog}" \ |
michael@182 | 89 | -E "${proftpd_sys_epilog}; echo 1 >$hintfile" \ |
michael@182 | 90 | ${proftpd_sys_file} |
michael@182 | 91 | shtool rotate -f \ |
michael@182 | 92 | -n ${proftpd_xfer_numfiles} -s ${proftpd_xfer_minsize} -d \ |
michael@182 | 93 | -z ${proftpd_xfer_complevel} -m 644 -o @l_susr@ -g @l_mgrp@ \ |
michael@182 | 94 | -P "${proftpd_xfer_prolog}" \ |
michael@182 | 95 | -E "${proftpd_xfer_epilog}; echo 1 >$hintfile" \ |
michael@182 | 96 | ${proftpd_xfer_file} |
michael@182 | 97 | if [ -s $hintfile ]; then |
michael@182 | 98 | rc proftpd restart |
michael@182 | 99 | fi |
michael@182 | 100 | rcTmp -k |
michael@182 | 101 |