From f76db6ea6b5191c704777bfe37d2761aceb99200 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Mon, 17 Apr 2023 13:32:30 +0200 Subject: [PATCH] [ceph] prevent from removing monitor on itself --- ceph/ceph-mon-stop-delete | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/ceph/ceph-mon-stop-delete b/ceph/ceph-mon-stop-delete index 1246a96..c40e58b 100755 --- a/ceph/ceph-mon-stop-delete +++ b/ceph/ceph-mon-stop-delete @@ -1,11 +1,12 @@ #!/bin/sh -if [ $# -ne 0 ]; then - echo "$0 (no arguments" +if [ $# -ne 1 ]; then + echo "$0 " + echo "f.i. $0 serverX" exit 1 fi -mon=mon.$(hostname) +mon=mon.$1 # Starting with monit, if available if [ -e /etc/monit ]; then