Files
lfs-auto/script/require-root.sh
kevin leptons 45c2578e76 create repo
2016-04-06 12:34:55 +07:00

12 lines
284 B
Bash
Executable File

#!/bin/bash
# using : valid script run as root
# it use in head of other script to warning that script must run as
# root
# author : kevin.leptons@gmail.com
if [ "$(id -u)" != "0" ]; then
echo "error: the script must be run as root"
exit 1
fi