1.1 --- a/proftpd/rc.proftpd Wed Feb 08 20:18:30 2012 +0200 1.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 1.3 @@ -1,101 +0,0 @@ 1.4 -#!@l_prefix@/bin/openpkg rc 1.5 -## 1.6 -## rc.proftpd -- Run-Commands 1.7 -## 1.8 - 1.9 -%config 1.10 - proftpd_enable="$openpkg_rc_def" 1.11 - proftpd_nice="0" 1.12 - proftpd_acc_file="@l_prefix@/var/proftpd/proftpd.access.log" 1.13 - proftpd_acc_prolog="true" 1.14 - proftpd_acc_epilog="true" 1.15 - proftpd_acc_numfiles="10" 1.16 - proftpd_acc_minsize="1M" 1.17 - proftpd_acc_complevel="9" 1.18 - proftpd_auth_file="@l_prefix@/var/proftpd/proftpd.auth.log" 1.19 - proftpd_auth_prolog="true" 1.20 - proftpd_auth_epilog="true" 1.21 - proftpd_auth_numfiles="10" 1.22 - proftpd_auth_minsize="1M" 1.23 - proftpd_auth_complevel="9" 1.24 - proftpd_sys_file="@l_prefix@/var/proftpd/proftpd.system.log" 1.25 - proftpd_sys_prolog="true" 1.26 - proftpd_sys_epilog="true" 1.27 - proftpd_sys_numfiles="10" 1.28 - proftpd_sys_minsize="1M" 1.29 - proftpd_sys_complevel="9" 1.30 - proftpd_xfer_file="@l_prefix@/var/proftpd/proftpd.xfer.log" 1.31 - proftpd_xfer_prolog="true" 1.32 - proftpd_xfer_epilog="true" 1.33 - proftpd_xfer_numfiles="10" 1.34 - proftpd_xfer_minsize="1M" 1.35 - proftpd_xfer_complevel="9" 1.36 - 1.37 -%common 1.38 - proftpd_pidfile="@l_prefix@/var/proftpd/proftpd.pid" 1.39 - proftpd_signal () { 1.40 - [ -f $proftpd_pidfile ] && kill -$1 `cat $proftpd_pidfile` 1.41 - } 1.42 - 1.43 -%status -u @l_susr@ -o 1.44 - proftpd_usable="unknown" 1.45 - proftpd_active="no" 1.46 - rcService proftpd enable yes && \ 1.47 - proftpd_signal 0 && proftpd_active="yes" 1.48 - echo "proftpd_enable=\"$proftpd_enable\"" 1.49 - echo "proftpd_usable=\"$proftpd_usable\"" 1.50 - echo "proftpd_active=\"$proftpd_active\"" 1.51 - 1.52 -%start -u @l_susr@ 1.53 - rcService proftpd enable yes || exit 0 1.54 - rcService proftpd active yes && exit 0 1.55 - nice -n $proftpd_nice @l_prefix@/sbin/proftpd 1.56 - 1.57 -%stop -u @l_susr@ 1.58 - rcService proftpd enable yes || exit 0 1.59 - rcService proftpd active no && exit 0 1.60 - proftpd_signal TERM 1.61 - sleep 2 1.62 - 1.63 -%restart -u @l_susr@ 1.64 - rcService proftpd enable yes || exit 0 1.65 - rcService proftpd active no && exit 0 1.66 - rc proftpd stop start 1.67 - 1.68 -%reload -u @l_susr@ 1.69 - rcService proftpd enable yes || exit 0 1.70 - proftpd_signal HUP 1.71 - 1.72 -%daily -u @l_susr@ 1.73 - rcService proftpd enable yes || exit 0 1.74 - rcTmp -i 1.75 - hintfile=`rcTmp -f -n hint` 1.76 - shtool rotate -f \ 1.77 - -n ${proftpd_acc_numfiles} -s ${proftpd_acc_minsize} -d \ 1.78 - -z ${proftpd_acc_complevel} -m 644 -o @l_susr@ -g @l_mgrp@ \ 1.79 - -P "${proftpd_acc_prolog}" \ 1.80 - -E "${proftpd_acc_epilog}; echo 1 >$hintfile" \ 1.81 - ${proftpd_acc_file} 1.82 - shtool rotate -f \ 1.83 - -n ${proftpd_auth_numfiles} -s ${proftpd_auth_minsize} -d \ 1.84 - -z ${proftpd_auth_complevel} -m 644 -o @l_susr@ -g @l_mgrp@ \ 1.85 - -P "${proftpd_auth_prolog}" \ 1.86 - -E "${proftpd_auth_epilog}; echo 1 >$hintfile" \ 1.87 - ${proftpd_auth_file} 1.88 - shtool rotate -f \ 1.89 - -n ${proftpd_sys_numfiles} -s ${proftpd_sys_minsize} -d \ 1.90 - -z ${proftpd_sys_complevel} -m 644 -o @l_susr@ -g @l_mgrp@ \ 1.91 - -P "${proftpd_sys_prolog}" \ 1.92 - -E "${proftpd_sys_epilog}; echo 1 >$hintfile" \ 1.93 - ${proftpd_sys_file} 1.94 - shtool rotate -f \ 1.95 - -n ${proftpd_xfer_numfiles} -s ${proftpd_xfer_minsize} -d \ 1.96 - -z ${proftpd_xfer_complevel} -m 644 -o @l_susr@ -g @l_mgrp@ \ 1.97 - -P "${proftpd_xfer_prolog}" \ 1.98 - -E "${proftpd_xfer_epilog}; echo 1 >$hintfile" \ 1.99 - ${proftpd_xfer_file} 1.100 - if [ -s $hintfile ]; then 1.101 - rc proftpd restart 1.102 - fi 1.103 - rcTmp -k 1.104 -