Changing init logic - drist - a remote deployment tool
 (HTM) git clone git://bitreich.org/drist/ git://enlrupgkhuxnvlhsf6lc3fziv5h2hhfrinws65d7roiv6bfj7d652fid.onion/drist/
 (DIR) Log
 (DIR) Files
 (DIR) Refs
 (DIR) Tags
 (DIR) README
 (DIR) LICENSE
       ---
 (DIR) commit 255b0947f1c71c841e6e676fc57001ec6376d117
 (DIR) parent 7cf4346ecfc60772ce096dc403276009794209cd
 (HTM) Author: Solene Rapenne <solene@perso.pw>
       Date:   Thu, 29 Nov 2018 18:39:14 +0100
       
       Changing init logic
       
       Diffstat:
         M drist                               |      15 ++++++---------
       
       1 file changed, 6 insertions(+), 9 deletions(-)
       ---
 (DIR) 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