16 lines
360 B
Bash
Executable File
16 lines
360 B
Bash
Executable File
#!/bin/bash
|
|
|
|
scriptdir=$(dirname $(realpath $0))
|
|
|
|
# ============================================================
|
|
|
|
if [[ $EUID -eq 0 ]]; then
|
|
echo "Running in root mode."
|
|
sh $scriptdir/init_root.sh
|
|
elif [[ $(sudo whoami) == "root" ]]; then
|
|
echo "Running in sudo mode."
|
|
sh $scriptdir/init_sudo.sh
|
|
else
|
|
echo "Please get sudo access first."
|
|
fi
|