1
0
mirror of https://github.com/OpenNebula/one.git synced 2025-03-23 22:50:09 +03:00

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

This commit is contained in:
Jaime Melis 2013-11-27 16:45:50 +01:00
parent 8833d387f2
commit e0c813b591

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`