-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrun.sh
More file actions
27 lines (24 loc) · 724 Bytes
/
run.sh
File metadata and controls
27 lines (24 loc) · 724 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#!/bin/bash
# ============================================================
# run.sh — Run the static IP setup script
# ============================================================
DIR="$(dirname "$0")"
SCRIPT="$DIR/create-static.sh"
echo "How do you want to run the script?"
echo " [1] bash (works everywhere, incl. NTFS/exFAT mounts) etc."
echo " [2] direct ./create-static.sh (requires permissions or chmod +x over network drives)"
echo ""
read -rp "Choice [1/2]: " CHOICE
case "$CHOICE" in
1)
sudo bash "$SCRIPT"
;;
2)
sudo chmod +x "$SCRIPT"
sudo "$SCRIPT"
;;
*)
echo "Invalid choice. Defaulting to bash..."
sudo bash "$SCRIPT"
;;
esac