Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

For init script, moved pid file to separate directory (workaround for…

… permission problem)
  • Loading branch information...
commit b3f071ab58a88daf24b657f97fe438869a0a7148 1 parent c2f9892
@EvanK authored brianlmoon committed
Showing with 14 additions and 2 deletions.
  1. +7 −1 install/deb.sh
  2. +7 −1 install/rhel.sh
View
8 install/deb.sh
@@ -13,7 +13,8 @@
### END INIT INFO
DAEMON=/usr/local/bin/gearman-manager
-PIDFILE=/var/run/gearman-manager.pid
+PIDDIR=/var/run/gearman
+PIDFILE=${PIDDIR}/manager.pid
LOGFILE=/var/log/gearman-manager.log
CONFIGDIR=/etc/gearman-manager
GEARMANUSER="gearman"
@@ -26,6 +27,11 @@ test -x ${DAEMON} || exit 0
start()
{
log_daemon_msg "Starting Gearman Manager"
+ if ! test -d ${PIDDIR}
+ then
+ mkdir ${PIDDIR}
+ chown ${GEARMANUSER} ${PIDDIR}
+ fi
if start-stop-daemon \
--start \
--startas $DAEMON \
View
8 install/rhel.sh
@@ -16,7 +16,8 @@
. /etc/rc.d/init.d/functions
DAEMON=/usr/local/bin/gearman-manager
-PIDFILE=/var/run/gearman-manager.pid
+PIDDIR=/var/run/gearman
+PIDFILE=${PIDDIR}/manager.pid
LOGFILE=/var/log/gearman-manager.log
CONFIGDIR=/etc/gearman-manager
GEARMANUSER="gearmand"
@@ -26,6 +27,11 @@ RETVAL=0
start() {
echo -n $"Starting gearman-manager: "
+ if ! test -d ${PIDDIR}
+ then
+ mkdir ${PIDDIR}
+ chown ${GEARMANUSER} ${PIDDIR}
+ fi
daemon --pidfile=$PIDFILE $DAEMON \
-P $PIDFILE \
-l $LOGFILE \

0 comments on commit b3f071a

Please sign in to comment.
Something went wrong with that request. Please try again.