ctdb-scripts: Drop PID file argument from wrapper
[samba.git] / ctdb / config / ctdbd_wrapper
index f80eca64fe8da8f96e667b343fc10453aebdd3b0..d56fbef7bc6d6258c04ea6d0929fb58c08b3507b 100755 (executable)
@@ -4,14 +4,13 @@
 
 usage ()
 {
-    echo "usage: ctdbd_wrapper <pidfile> { start | stop }"
+    echo "usage: ctdbd_wrapper { start | stop }"
     exit 1
 }
 
-[ $# -eq 2 ] || usage
+[ $# -eq 1 ] || usage
 
-pidfile="$1"
-action="$2"
+action="$1"
 
 ############################################################
 
@@ -94,9 +93,8 @@ build_ctdb_options ()
     fi
     maybe_set "--reclock"                "$CTDB_RECOVERY_LOCK"
 
-    maybe_set "--pidfile"                "$pidfile"
-
     # build up ctdb_options variable from optional parameters
+    maybe_set "--pidfile"                "$CTDB_PIDFILE"
     maybe_set "--logging"                "$CTDB_LOGGING"
     maybe_set "--nlist"                  "$CTDB_NODES"
     maybe_set "--socket"                 "$CTDB_SOCKET"