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