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