saving uncommitted changes in /etc prior to emerge run

This commit is contained in:
2015-05-08 12:34:35 +02:00
committed by root
parent e8cb41bf93
commit fab87cf94d
4 changed files with 1020 additions and 0 deletions

33
init.d/redis Executable file
View File

@@ -0,0 +1,33 @@
#!/sbin/runscript
# $Header: /var/cvsroot/gentoo-x86/dev-db/redis/files/redis.initd-4,v 1.4 2015/03/12 12:07:36 mschiff Exp $
REDIS_DIR=${REDIS_DIR:-/var/lib/redis}
REDIS_CONF=${REDIS_CONF:-/etc/redis.conf}
REDIS_OPTS=${REDIS_OPTS:-"${REDIS_CONF}"}
REDIS_USER=${REDIS_USER:-redis}
REDIS_GROUP=${REDIS_GROUP:-redis}
REDIS_TIMEOUT=${REDIS_TIMEOUT:-30}
command=/usr/sbin/redis-server
pidfile=${REDIS_PID:-/run/redis/redis.pid}
start_stop_daemon_args="--background --make-pidfile --pidfile ${pidfile}
--chdir \"${REDIS_DIR}\" --user ${REDIS_USER} --group ${REDIS_GROUP}"
command_args="${REDIS_OPTS}"
depend() {
use net localmount logger
after keepalived
}
start_pre() {
checkpath -d -m 0775 -o ${REDIS_USER}:${REDIS_GROUP} $(dirname ${REDIS_PID})
}
stop() {
ebegin "Stopping ${SVCNAME}"
start-stop-daemon --stop \
--exec ${command} \
--retry ${REDIS_TIMEOUT} \
--pidfile ${pidfile}
eend
}