proftpd/rc.proftpd

Sat, 24 Mar 2012 21:40:49 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Sat, 24 Mar 2012 21:40:49 +0100
changeset 414
fd611cde817f
permissions
-rw-r--r--

Introduce many changes to the buildconf and source code including:
(01) clean up, update, and partially update default config files,
(02) seems that Melware is unable to perform release engineering so
update chan_capi to new daily snapshot to solve echo problems,
(03) correct Asterisk inadequate hard coded gmime version check,
(04) force postgresql pthreads linkage to solve build problem,
(05) remove buggy hard coded LibXML configure definitions,
(06) remove local architecture specification to allow GCC
internal logic to determine proper CPU type instead,
(07) remove vendor sound install target causing uncontrolled
downloads and non RPM managed file installation,
(08) solve long outstanding bug in tcptls causing Asterisk
to ignore any intermediate CA certificate signatures,
(09) back out Digium engineering team's bright idea of replacing the
very portable and pervasive POSIX rand(1) with ast_random(), and
then not even implementing it causing all references to fail in
platforms not providing the very new POSIX.1-2008 mkdtemp(3)
function only distributed by BSD and some Linux,
(10) withdraw advanced linker symbol manipulations from SVR5 builds
until either Binutils supports hybrid versioned and anonymous
linker scripts or GCC stops hard coding versioned linker scripts,
(11) correct missing library linkage, some tailored to a specific OS,
(12) remove outdated logic for the no longer distributed gmime-config(1),
(13) remove local gmime buildconf hacks now that Asterisk has corrected
their own build configuration to almost portably support gmime,
(14) solve build problems relating to undetected LibXML paths,
(15) correct erroneous out of tree include definitions,
(16) improve some variable and comment naming,
(17) simplify sound language path hierarchy creation,
and correct australian english installation logic.

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

mercurial