bitreich-drist

fork of bitreich.org/drist
git clone git://git.pyratebeard.net/bitreich-drist.git
Log | Files | Refs | README | LICENSE

commit 255b0947f1c71c841e6e676fc57001ec6376d117
parent 7cf4346ecfc60772ce096dc403276009794209cd
Author: Solene Rapenne <solene@perso.pw>
Date:   Thu, 29 Nov 2018 18:39:14 +0100

Changing init logic

Diffstat:
Mdrist | 15++++++---------
1 file changed, 6 insertions(+), 9 deletions(-)

diff --git a/drist b/drist @@ -1,11 +1,15 @@ #!/bin/sh +SIMULATE=0 +SUDO=0 +SUDO_BIN=sudo +EXEC="" + usage() { - echo "$0 [-s [-e sudo|doas]] server" + echo "$0 [-n] [-s [-e sudo|doas]] server" exit 0 } - while getopts nse: arg; do case ${arg} in n) SIMULATE=1 ;; @@ -19,14 +23,7 @@ shift $((OPTIND - 1)) # allow to use a privilege escalation program if [ "$SUDO" -eq 1 ] then - # defaulting to sudo - if [ -z "$SUDO_BIN" ] - then - SUDO_BIN=sudo - fi EXEC="$SUDO_BIN" -else - EXEC="" fi # check if host exists