makeuser/makeuser_no_ansible

32 lines
688 B
Plaintext
Raw Normal View History

2019-11-05 15:57:19 +00:00
#!/bin/bash
# ---------------------------------------------------------------------------
# makeuser - tilde new user creation
# Usage: makeuser [-h|--help] <username> <email> "<pubkey>"
# ---------------------------------------------------------------------------
#
# Forked from tilde.team's make user script (
PROGNAME=${0##*/}
VERSION="0.4"
CONFIG=./setenv
2019-11-05 15:57:19 +00:00
. $CONFIG
2019-11-05 15:57:19 +00:00
2019-12-12 20:15:11 +00:00
source include/functions
2019-11-05 15:57:19 +00:00
[[ $(id -u) == 0 ]] && error_exit "Do not run this script as root."
case $1 in
-h | --help)
usage; exit ;;
-* | --*)
usage; error_exit "unknown option $1" ;;
*)
[[ $# -ne 3 ]] && error_exit "not enough args"
makeuser_no_ansible $1 $2 #adding new user
2019-11-05 15:57:19 +00:00
;;
esac