memcached/rc.memcached

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@378 1 #!@l_prefix@/bin/openpkg rc
michael@378 2 ##
michael@378 3 ## rc.memcached -- Run-Commands
michael@378 4 ##
michael@378 5
michael@378 6 %config
michael@378 7 memcached_enable="$openpkg_rc_def"
michael@378 8 memcached_daemon="yes"
michael@378 9 memcached_flags="-l 127.0.0.1 -p 11211"
michael@378 10 memcached_log_prolog="true"
michael@378 11 memcached_log_epilog="true"
michael@378 12 memcached_log_numfiles="10"
michael@378 13 memcached_log_minsize="1M"
michael@378 14 memcached_log_complevel="9"
michael@378 15
michael@378 16 %common
michael@378 17 memcached_pidfile="@l_prefix@/var/memcached/memcached.pid"
michael@378 18 memcached_signal () {
michael@378 19 [ -f $memcached_pidfile ] && kill -$1 `cat $memcached_pidfile`
michael@378 20 }
michael@378 21
michael@378 22 %status -u @l_susr@ -o
michael@378 23 memcached_usable="unknown"
michael@378 24 memcached_active="no"
michael@378 25 rcService memcached enable yes && \
michael@378 26 memcached_signal 0 && memcached_active="yes"
michael@378 27 echo "memcached_enable=\"$memcached_enable\""
michael@378 28 echo "memcached_usable=\"$memcached_usable\""
michael@378 29 echo "memcached_active=\"$memcached_active\""
michael@378 30
michael@378 31 %start -p 100 -u @l_susr@
michael@378 32 rcService memcached enable yes || exit 0
michael@378 33 rcService memcached active yes && exit 0
michael@378 34 rcVarIsYes memcached_daemon || exit 0
michael@378 35 @l_prefix@/bin/memcached \
michael@378 36 -d -u @l_nusr@ \
michael@378 37 -P $memcached_pidfile \
michael@378 38 $memcached_flags
michael@378 39
michael@378 40 %stop -p 900 -u @l_susr@
michael@378 41 rcService memcached enable yes || exit 0
michael@378 42 rcService memcached active no && exit 0
michael@378 43 rcVarIsYes memcached_daemon || exit 0
michael@378 44 memcached_signal TERM
michael@378 45 sleep 2
michael@378 46 rm -f $memcached_pidfile >/dev/null 2>&1 || true
michael@378 47
michael@378 48 %restart -p 100 -u @l_susr@
michael@378 49 rcService memcached enable yes || exit 0
michael@378 50 rcService memcached active no && exit 0
michael@378 51 rcVarIsYes memcached_daemon || exit 0
michael@378 52 rc memcached stop start
michael@378 53
michael@378 54 %daily -u @l_susr@
michael@378 55 rcService memcached enable yes || exit 0
michael@378 56 rcVarIsYes memcached_daemon || exit 0
michael@378 57 shtool rotate -f \
michael@378 58 -n $memcached_log_numfiles -s $memcached_log_minsize -d \
michael@378 59 -z $memcached_log_complevel -m 644 -o @l_nusr@ -g @l_ngrp@ \
michael@378 60 -P "$memcached_log_prolog" \
michael@378 61 -E "$memcached_log_epilog && rc memcached reload" \
michael@378 62 @l_prefix@/var/memcached/memcached.log
michael@378 63

mercurial