-
Notifications
You must be signed in to change notification settings - Fork 0
/
extra.sh
90 lines (87 loc) · 1.4 KB
/
extra.sh
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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
#!/bin/bash
# (c) J~NET 2021
# jnet.sytes.net
#
#
trap '
trap - INT # restore default INT handler
kill -s INT "$$"
' INT
#
file="/usr/bin/git"
if [[ -f $file ]]
then
echo ""
else
sudo apt install -y git
fi
#
# setup menu perms
#sudo chmod +x *sh
#
#
echo -en "\e[92mBonus Menu For RPi"
echo ""
echo ""
echo "1. See Temperature"
echo "2. Raspi-Config"
echo "3. Update & Upgrade"
echo "4. Update EEPROM"
echo "5. Screenshot From Pi Cam To image.jpg"
echo "6. Stream Pi Cam To video.yuv"
echo "7. Enable Firewall"
echo "8. Exit Menu"
echo "Enter your choice: (Anything else to exit)"
read n
case $n in
1)
# op 1
vcgencmd measure_temp
echo "Press Enter When Ready"
read Y
# returning to menu
bash extra.sh ;;
2)
# op 2
sudo raspi-config
echo "Press Enter When Ready"
read Y
# returning to menu
bash extra.sh ;;
3)
# op 3
sudo apt update -y && sudo apt upgrade && sudo rpi-update
# returning to menu
echo "Press Enter When Ready"
read Y
bash extra.sh ;;
4)
sudo apt update
sudo apt full-upgrade
sudo apt install rpi-eeprom
echo "Press Enter When Ready"
read Y
# returning to menu
bash extra.sh ;;
5)
# op 5
raspistill -o image.jpg
echo "Press Enter When Ready"
read Y
# returning to menu
bash extra.sh ;;
# send arg here
6)
raspividyuv -o video.yuv
echo "Press Enter When Ready"
read Y
bash extra.sh ;;
7)
sudo apt install -y ufw
sudo ufw enable
echo "Firewall Enabled"
bash extra.sh ;;
8)
# op 7
bash menu.sh;;
esac