diff options
author | Eric Hameleers <alien@slackware.com> | 2021-03-10 21:11:27 +0000 |
---|---|---|
committer | Eric Hameleers <alien@slackware.com> | 2021-03-10 21:11:27 +0000 |
commit | f15c8c11513a388af8207150f069d18850fe0ba7 (patch) | |
tree | a8da47ddf8978827ade148c212db074752646e51 /mongodb/build/rc.mongodb | |
parent | b49dab2327403bf7ba4b220683131e58106686d5 (diff) | |
download | asb-f15c8c11513a388af8207150f069d18850fe0ba7.tar.gz asb-f15c8c11513a388af8207150f069d18850fe0ba7.tar.xz |
mongodb: fix the rc script so that it works when /var/run is on a tmpfs
Diffstat (limited to 'mongodb/build/rc.mongodb')
-rw-r--r-- | mongodb/build/rc.mongodb | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/mongodb/build/rc.mongodb b/mongodb/build/rc.mongodb index b82e0790..9530b0d5 100644 --- a/mongodb/build/rc.mongodb +++ b/mongodb/build/rc.mongodb @@ -24,6 +24,11 @@ if [ -z "$PID" ]; then fi mongo_start() { + if [ ! -d $(dirname ${PID}) ]; then + mkdir -p $(dirname ${PID}) + chown ${USR} $(dirname ${PID}) + chmod 750 $(dirname ${PID}) + fi su -l ${USR} -s ${SHELL} \ -c "/usr/bin/mongod --config=${CONFIG}" if [ $? -eq 0 ]; then |