create ctdb pid directory
authorMichael Tokarev <mjt@tls.msk.ru>
Fri, 9 Sep 2022 09:49:55 +0000 (12:49 +0300)
committerMichael Tokarev <mjt@tls.msk.ru>
Mon, 10 Jun 2024 17:17:53 +0000 (20:17 +0300)
(which is /run/ctdb/). Create it in the systemd service
file (using RuntimeDirectory directive) and in the sysv-init
script.

Gbp-Pq: Name ctdb-create-piddir.patch

ctdb/config/ctdb.init
packaging/systemd/ctdb.service.in

index 6a7f7812394d3025e7512fc197de23d22a02a628..d49419a5b5eaf69570b85f00e6fe2ffd5a58addc 100755 (executable)
@@ -77,6 +77,7 @@ start()
            return $RETVAL
            ;;
        debian)
+           mkdir -p -m0755 ${pidfile%/*}
            eval start-stop-daemon --start --quiet --background --exec "$ctdbd"
            ;;
     esac
index 7905a93e24293d0d7de7a4dad6ff4c4bf7ca706f..eefc7468a442eb3793c5f0364ac741e9efa81e02 100644 (file)
@@ -10,6 +10,7 @@ LimitCORE=infinity
 LimitNOFILE=1048576
 TasksMax=4096
 PIDFile=@CTDB_RUNDIR@/ctdbd.pid
+RuntimeDirectory=ctdb
 ExecStart=@SBINDIR@/ctdbd
 ExecStop=@BINDIR@/ctdb shutdown
 KillMode=control-group