Commit e9787ef4 by Vincent Pelletier

stack.erp5: Abort also if pidfile cannot be read.

1 parent 61753143
......@@ -15,7 +15,7 @@
# not need these here).
[mariadb-resiliency-after-import-script]
filename = instance-mariadb-resiliency-after-import-script.sh.in
md5sum = 5fc1bb6ade3458e0c2970c31ca7157ea
md5sum = 1e89de954d816b93f76d9b75820d192c
[template-mariadb]
filename = instance-mariadb.cfg.in
......
......@@ -23,7 +23,11 @@ update_executable='${update-mysql:output}'
# Make sure mariadb is not already running
if [ -e "$pid_file" ]; then
pid=$(cat "$pid_file") > /dev/null 2>&1
pid=$(cat "$pid_file")
if [ $? -ne 0 ]; then
echo "Cannot read Mariadb pidfile, assuming running. Aborting."
exit 1
fi
if kill -0 "$pid"; then
echo "Mariadb is already running with pid $pid. Aborting."
exit 1
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!