Lines 1-4
Link Here
|
1 |
#!/bin/bash |
1 |
#!/bin/bash |
2 |
# Shell wrapper that calls wifi-radar.py using sudo |
2 |
|
3 |
PATH=/sbin:/usr/sbin:/usr/local/sbin:$PATH |
3 |
# I haven't been able to get gksudo to work yet... so stick with su for now |
4 |
sudo /usr/sbin/wifi-radar $* |
4 |
MODE=su |
|
|
5 |
WIFI=/usr/sbin/wifi-radar |
6 |
WIFI_ICON=/usr/share/pixmaps/wifi-radar.png |
7 |
|
8 |
# Make the message appropriate to the mode |
9 |
if [[ mode -eq "su" ]]; then |
10 |
MESSAGE="Please enter your root password to run wifi-radar" |
11 |
elif [[ mode -eq "sudo" ]]; then |
12 |
MESSAGE="Please enter your user password to run wifi-radar" |
13 |
fi |
14 |
|
15 |
# Call gksu/gksudo to launch /usr/sbin/wifi-radar |
16 |
gk$MODE --disable-grab \ |
17 |
--title "WiFi Radar" \ |
18 |
--message "$MESSAGE" \ |
19 |
--icon $WIFI_ICON \ |
20 |
$WIFI $* 2>/dev/null |