Bug #678: Startup should create dir for pid file if it does not exists

(cherry picked from commit e0c813b591)
This commit is contained in:
Jaime Melis authored and Javi Fontan committed 2013-11-27 17:02:07 +01:00
1 parent 04d2611791
commit 404a2fa100
1 file changed
+9
+9
View File
@@ -52,6 +52,15 @@ BACKUP="true"
#------------------------------------------------------------------------------
setup()
{
ONE_PID_DIR=`dirname $ONE_PID`
mkdir -p $ONE_PID_DIR
if [ ! -w $ONE_PID_DIR ]; then
echo "$ONE_PID_DIR is not writable, cannot start oned or scheduler."
exit 1
fi
if [ -f $LOCK_FILE ]; then
if [ -f $ONE_PID ]; then
ONEPID=`cat $ONE_PID`