added require root
This commit is contained in:
parent
ab721feae4
commit
0d26eef610
|
@ -19,6 +19,12 @@ if [[ -f /usr/local/etc/bashup.cnf ]]; then
|
||||||
source /usr/local/etc/bashup.cnf
|
source /usr/local/etc/bashup.cnf
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# require root
|
||||||
|
if [ "${EUID}" -ne 0 ]; then
|
||||||
|
echo "This script must be run as root"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
if [ ! -d $backup_storage_dir ]; then
|
if [ ! -d $backup_storage_dir ]; then
|
||||||
echo "ERROR: Backup storage dir ($backup_storage_dir) does not exist."
|
echo "ERROR: Backup storage dir ($backup_storage_dir) does not exist."
|
||||||
exit 1
|
exit 1
|
||||||
|
|
|
@ -21,6 +21,12 @@ if [[ -f /usr/local/etc/bashup.cnf ]]; then
|
||||||
source /usr/local/etc/bashup.cnf
|
source /usr/local/etc/bashup.cnf
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# require root
|
||||||
|
if [ "${EUID}" -ne 0 ]; then
|
||||||
|
echo "This script must be run as root"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
if [ ! -d $backup_storage_dir ]; then
|
if [ ! -d $backup_storage_dir ]; then
|
||||||
echo "ERROR: Backup storage dir ($backup_storage_dir) does not exist."
|
echo "ERROR: Backup storage dir ($backup_storage_dir) does not exist."
|
||||||
exit 1
|
exit 1
|
||||||
|
|
|
@ -17,6 +17,12 @@ if [[ -f /usr/local/etc/bashup.cnf ]]; then
|
||||||
source /usr/local/etc/bashup.cnf
|
source /usr/local/etc/bashup.cnf
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# require root
|
||||||
|
if [ "${EUID}" -ne 0 ]; then
|
||||||
|
echo "This script must be run as root"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
if [ ! -d $backup_storage_dir ]; then
|
if [ ! -d $backup_storage_dir ]; then
|
||||||
echo "ERROR: Backup storage dir ($backup_storage_dir) does not exist."
|
echo "ERROR: Backup storage dir ($backup_storage_dir) does not exist."
|
||||||
exit 1
|
exit 1
|
||||||
|
|
|
@ -14,6 +14,12 @@ if [[ -f /usr/local/etc/bashup.cnf ]]; then
|
||||||
source /usr/local/etc/bashup.cnf
|
source /usr/local/etc/bashup.cnf
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# require root
|
||||||
|
if [ "${EUID}" -ne 0 ]; then
|
||||||
|
echo "This script must be run as root"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
help()
|
help()
|
||||||
{
|
{
|
||||||
thisfilename=$(basename -- "$0")
|
thisfilename=$(basename -- "$0")
|
||||||
|
|
|
@ -14,6 +14,12 @@ if [[ -f /usr/local/etc/bashup.cnf ]]; then
|
||||||
source /usr/local/etc/bashup.cnf
|
source /usr/local/etc/bashup.cnf
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# require root
|
||||||
|
if [ "${EUID}" -ne 0 ]; then
|
||||||
|
echo "This script must be run as root"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
help()
|
help()
|
||||||
{
|
{
|
||||||
thisfilename=$(basename -- "$0")
|
thisfilename=$(basename -- "$0")
|
||||||
|
|
|
@ -14,6 +14,12 @@ if [[ -f /usr/local/etc/bashup.cnf ]]; then
|
||||||
source /usr/local/etc/bashup.cnf
|
source /usr/local/etc/bashup.cnf
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# require root
|
||||||
|
if [ "${EUID}" -ne 0 ]; then
|
||||||
|
echo "This script must be run as root"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
help()
|
help()
|
||||||
{
|
{
|
||||||
thisfilename=$(basename -- "$0")
|
thisfilename=$(basename -- "$0")
|
||||||
|
|
|
@ -12,6 +12,12 @@ if [[ -f /usr/local/etc/bashup.cnf ]]; then
|
||||||
source /usr/local/etc/bashup.cnf
|
source /usr/local/etc/bashup.cnf
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# require root
|
||||||
|
if [ "${EUID}" -ne 0 ]; then
|
||||||
|
echo "This script must be run as root"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
help()
|
help()
|
||||||
{
|
{
|
||||||
thisfilename=$(basename -- "$0")
|
thisfilename=$(basename -- "$0")
|
||||||
|
|
Loading…
Reference in New Issue
Block a user