Require root

This commit is contained in:
Douglas Barone 2023-06-07 10:53:15 -04:00
parent 8d12d96bb3
commit ea87b7bf93
6 changed files with 36 additions and 0 deletions

View File

@ -6,6 +6,12 @@
# For use with Zential Server #
###############################
# Check if is running as root
if [ "$(id -u)" != "0" ]; then
echo "This script must be run as root" 1>&2
exit 1
fi
USERNAME=$1
NAME=$2
DEFAULT_QUOTA=256000 # 256MB

View File

@ -6,6 +6,12 @@
# For use with Zential Server #
###############################
# Check if is running as root
if [ "$(id -u)" != "0" ]; then
echo "This script must be run as root" 1>&2
exit 1
fi
USERNAME=$1
NAME=$2
DEFAULT_QUOTA=256000 # 256MB

View File

@ -6,6 +6,12 @@
# For use with Zential Server #
###############################
# Check if is running as root
if [ "$(id -u)" != "0" ]; then
echo "This script must be run as root" 1>&2
exit 1
fi
USERNAME=$1
NAME=$2
DEFAULT_QUOTA=256000 # 256MB

View File

@ -1,5 +1,11 @@
#!/bin/bash
# Check if is running as root
if [ "$(id -u)" != "0" ]; then
echo "This script must be run as root" 1>&2
exit 1
fi
USERNAME=$1
# Check if arguments are not empty

View File

@ -1,5 +1,11 @@
#!/bin/bash
# Check if is running as root
if [ "$(id -u)" != "0" ]; then
echo "This script must be run as root" 1>&2
exit 1
fi
USERNAME=$1
DEFAULT_PASSWORD=123456789
PASSWORD=${2:-$DEFAULT_PASSWORD}

View File

@ -1,5 +1,11 @@
#!/bin/bash
# Check if is running as root
if [ "$(id -u)" != "0" ]; then
echo "This script must be run as root" 1>&2
exit 1
fi
USERNAME=$1
QUOTA=$2