forked from finn/tinyboard
offboard-spoke.sh: run as root, remove sudo from python3 install
This commit is contained in:
@@ -28,8 +28,20 @@ check_deps() {
|
||||
fi
|
||||
}
|
||||
|
||||
if [ "$(id -u)" -eq 0 ]; then
|
||||
die "Run as the hub user, not root."
|
||||
[ "$(id -u)" -eq 0 ] || die "Run as root"
|
||||
|
||||
if ! command -v python3 >/dev/null 2>&1; then
|
||||
if command -v apt-get >/dev/null 2>&1; then
|
||||
apt-get install -y -q python3
|
||||
elif command -v dnf >/dev/null 2>&1; then
|
||||
dnf install -y -q python3
|
||||
elif command -v yum >/dev/null 2>&1; then
|
||||
yum install -y -q python3
|
||||
elif command -v pacman >/dev/null 2>&1; then
|
||||
pacman -S --noconfirm python
|
||||
else
|
||||
die "python3 not found and no supported package manager to install it"
|
||||
fi
|
||||
fi
|
||||
|
||||
check_deps rclone crontab python3
|
||||
|
||||
Reference in New Issue
Block a user