add library mode
This commit is contained in:
parent
d57d102509
commit
9b00723bc4
1 changed files with 15 additions and 0 deletions
15
menhera.sh
15
menhera.sh
|
@ -179,6 +179,21 @@ clear_processes() {
|
||||||
}
|
}
|
||||||
|
|
||||||
# main procedure
|
# main procedure
|
||||||
|
LIBRARY_ONLY=0
|
||||||
|
|
||||||
|
while test $# -gt 0
|
||||||
|
do
|
||||||
|
case "$1" in
|
||||||
|
--lib) LIBRARY_ONLY=1
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
shift
|
||||||
|
done
|
||||||
|
|
||||||
|
if [[ $LIBRARY_ONLY -eq 1 ]]; then
|
||||||
|
# acting as a library only
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
if [[ $EUID -ne 0 ]]; then
|
if [[ $EUID -ne 0 ]]; then
|
||||||
echo "This script must be run as root"
|
echo "This script must be run as root"
|
||||||
|
|
Loading…
Reference in a new issue