-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmyrf
More file actions
46 lines (39 loc) · 1 KB
/
myrf
File metadata and controls
46 lines (39 loc) · 1 KB
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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
#!/usr/bin/env bash
# Made by Sinfallas <[email protected]>
# Licence: GPL-2
LC_ALL=C
trap 'rm -f /run/$(basename "$0").pid; exit' 0 1 2 3 9 15
echo "$BASHPID" > /run/$'(basename "$0")'.pid
if [[ "$EUID" != "0" ]]; then
echo -e "\\e[00;31mERROR: DEBES SER ROOT\\e[00m"
exit 1
fi
case "$1" in
apagartodo)
rfkill block all
echo -e "\e[00;1;92mFinalizado...\e[00m"
;;
encendertodo)
rfkill unblock all
echo -e "\e[00;1;92mFinalizado...\e[00m"
;;
resetear)
rfkill block all
rfkill unblock all
echo -e "\e[00;1;92mFinalizado...\e[00m"
;;
instalar)
apt-get -q update
apt-get -qy install rfkill
echo -e "\e[00;1;92mFinalizado...\e[00m"
;;
*)
echo "uso: $(basename $0) opciones"
echo "apagartodo Apaga todos los dispositivos inalambricos"
echo "encendertodo Enciende todos los dispositivos inalambricos"
echo "resetear Resetea todos los dispositivos inalambricos"
echo "instalar Instala las herramientas necesarias"
;;
esac
rm -f /run/$'(basename "$0")'.pid
exit 0