allow nonroot user to see help

This commit is contained in:
James Barnett
2017-06-24 22:06:38 -04:00
parent bcd17e77ad
commit 455b8718dd

View File

@@ -78,9 +78,6 @@ trapkill() {
die "Exited due to user intervention." die "Exited due to user intervention."
} }
[[ $EUID -ne 0 ]] && die "Script must be run as root."
! [[ -f $SNAPPER_CONFIG ]] && die "$SNAPPER_CONFIG does not exist."
trap 'traperror ${LINENO} $? "$BASH_COMMAND" $BASH_LINENO "${FUNCNAME[@]}"' ERR trap 'traperror ${LINENO} $? "$BASH_COMMAND" $BASH_LINENO "${FUNCNAME[@]}"' ERR
trap trapkill SIGTERM SIGINT trap trapkill SIGTERM SIGINT
@@ -141,6 +138,9 @@ while [[ $# -gt 0 ]]; do
esac esac
done done
[[ $EUID -ne 0 ]] && die "Script must be run as root."
! [[ -f $SNAPPER_CONFIG ]] && die "$SNAPPER_CONFIG does not exist."
description=${description:-"latest incremental backup"} description=${description:-"latest incremental backup"}
uuid_cmdline=${uuid_cmdline:-"none"} uuid_cmdline=${uuid_cmdline:-"none"}
noconfirm=${noconfirm:-"no"} noconfirm=${noconfirm:-"no"}