├── .complete ├── .funfacts ├── .gitignore ├── README.md ├── app-check ├── bap-wallpaper.jpg ├── build-a-pi ├── changelog ├── conky ├── .conkyrc ├── conky-7inch ├── conky-large ├── conky-logo.png ├── conky-medium ├── conky-small ├── get-freq ├── get-grid ├── get-vfo ├── grid └── setconky ├── diagnostic ├── functions ├── additional.function ├── autohotspot ├── base.function ├── flsuite.function └── utility.function ├── icons ├── chirp.png ├── gps.png ├── hamrs.png ├── padlock.png ├── pmlogo.png ├── radio.png ├── vara.png └── wrench.png ├── logo.png ├── menu-update ├── patch-menu ├── patch ├── README.md └── test-patch └── update /.complete: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | MYPATH="$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null 2>&1 && pwd)" 4 | LOGO=${MYPATH}/logo.png 5 | 6 | cat <${MYPATH}/boot.txt 7 | Build-a-Pi Build Complete. 8 | 9 | If you found this script helpful 10 | consider a donation to encourage 11 | future development. 12 | 13 | https://paypal.me/km4ack 14 | 15 | 73, de KM4ACK 16 | 17 | EOF 18 | 19 | OUT=$(yad --width=550 --height=300 --text-align=center --center --title="Build-a-Pi" --show-uri \ 20 | --image ${LOGO} --window-icon=${LOGO} --image-on-top --separator="|" --item-separator="|" \ 21 | --text-info \ 22 | --button="CLOSE":2 <${MYPATH}/boot.txt \ 23 | >/dev/null 2>&1) 24 | BUT=$? 25 | if [ $BUT = 252 ]; then 26 | rm ${MYPATH}/boot.txt 27 | crontab -l >${HOME}/Documents/cron.tmp 28 | sed -i 's/@reboot\ sleep\ 10.*//' ${HOME}/Documents/cron.tmp 29 | crontab ${HOME}/Documents/cron.tmp 30 | exit 31 | fi 32 | rm ${MYPATH}/boot.txt 33 | crontab -l >${HOME}/Documents/cron.tmp 34 | sed -i 's/@reboot\ sleep\ 10.*//' ${HOME}/Documents/cron.tmp 35 | crontab ${HOME}/Documents/cron.tmp 36 | -------------------------------------------------------------------------------- /.funfacts: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | #20200515 km4ack 4 | 5 | MYPATH="$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null 2>&1 && pwd)" 6 | LOGO=${MYPATH}/logo.png 7 | 8 | yad --width=400 --height=200 --title="KM4ACK Fun Facts" --timeout=30 --image ${LOGO} --text-align=center --skip-taskbar --image-on-top \ 9 | --wrap --no-buttons --center --window-icon=${LOGO} --undecorated --text="\r\rKM4ACK\rFun Facts\r\r \ 10 | There are over 1500 lines of code in Build-a-Pi" 11 | 12 | yad --width=400 --height=200 --title="Fun Facts" --timeout=30 --image ${LOGO} --text-align=center --skip-taskbar --image-on-top \ 13 | --wrap --no-buttons --center --window-icon=${LOGO} --undecorated --text="\r\rKM4ACK\rFun Facts\r\r \ 14 | When he released his first video, he had never written a bash script" 15 | 16 | yad --width=400 --height=200 --title="Fun Facts" --timeout=30 --image ${LOGO} --text-align=center --skip-taskbar --image-on-top \ 17 | --wrap --no-buttons --center --window-icon=${LOGO} --undecorated --text="\r\rKM4ACK\rFun Facts\r\r \ 18 | He studied for a week and then drove 1 1/2 hours to take the technician exam because it was the closest test location that weekend." 19 | 20 | yad --width=400 --height=200 --title="Fun Facts" --timeout=30 --image ${LOGO} --text-align=center --skip-taskbar --image-on-top \ 21 | --wrap --no-buttons --center --window-icon=${LOGO} --undecorated --text="\r\rKM4ACK\rFun Facts\r\r \ 22 | A year after passing the tech exam, he passed the extra exam" 23 | 24 | yad --width=400 --height=200 --title="Fun Facts" --timeout=30 --image ${LOGO} --text-align=center --skip-taskbar --image-on-top \ 25 | --wrap --no-buttons --center --window-icon=${LOGO} --undecorated --text="\r\rKM4ACK\rFun Facts\r\r \ 26 | He doesn't know CW. dit dit" 27 | 28 | yad --width=400 --height=200 --title="Fun Facts" --timeout=30 --image ${LOGO} --text-align=center --skip-taskbar --image-on-top \ 29 | --wrap --no-buttons --center --window-icon=${LOGO} --undecorated --text="\r\rKM4ACK\rFun Facts\r\r \ 30 | He released his first ham radio video on YouTube in 2018" 31 | 32 | yad --width=400 --height=200 --title="Fun Facts" --timeout=30 --image ${LOGO} --text-align=center --skip-taskbar --image-on-top \ 33 | --wrap --no-buttons --center --window-icon=${LOGO} --undecorated --text="\r\rKM4ACK\rFun Facts\r\r \ 34 | The Emergency Email Server was the first and last thing he programmed in PHP" 35 | 36 | yad --width=400 --height=200 --title="Fun Facts" --timeout=30 --image ${LOGO} --text-align=center --skip-taskbar --image-on-top \ 37 | --wrap --no-buttons --center --window-icon=${LOGO} --undecorated --text="\r\rKM4ACK\rFun Facts\r\r \ 38 | Patrons get to test his very latest software before they go public. Join in on the fun. https://patreon.com/km4ack" 39 | 40 | yad --width=400 --height=200 --title="Fun Facts" --timeout=30 --image ${LOGO} --text-align=center --skip-taskbar --image-on-top \ 41 | --wrap --no-buttons --center --window-icon=${LOGO} --undecorated --text="\r\rKM4ACK\rFun Facts\r\r \ 42 | His Jeep is a trail rated 2007 Wrangler X" 43 | 44 | yad --width=400 --height=200 --title="Fun Facts" --timeout=30 --image ${LOGO} --text-align=center --skip-taskbar --image-on-top \ 45 | --wrap --no-buttons --center --window-icon=${LOGO} --undecorated --text="\r\rKM4ACK\rFun Facts\r\r \ 46 | Yes. He has a Raspberry Pi in the Jeep" 47 | 48 | yad --width=400 --height=200 --title="Fun Facts" --timeout=30 --image ${LOGO} --text-align=center --skip-taskbar --image-on-top \ 49 | --wrap --no-buttons --center --window-icon=${LOGO} --undecorated --text="\r\rKM4ACK\rFun Facts\r\r \ 50 | The Jeep also houses an 857D for HF and a FTM400 for 2M and 440" 51 | 52 | yad --width=400 --height=200 --title="Fun Facts" --timeout=30 --image ${LOGO} --text-align=center --skip-taskbar --image-on-top \ 53 | --wrap --no-buttons --center --window-icon=${LOGO} --undecorated --text="\r\rKM4ACK\rFun Facts\r\r \ 54 | There is also a Yaesu FT65r on the sun visor ready to grab and go" 55 | 56 | yad --width=400 --height=200 --title="Fun Facts" --timeout=30 --image ${LOGO} --text-align=center --skip-taskbar --image-on-top \ 57 | --wrap --no-buttons --center --window-icon=${LOGO} --undecorated --text="\r\rKM4ACK\rFun Facts\r\r \ 58 | The Yaesu 891 was the first HF rig he purchased new" 59 | 60 | yad --width=400 --height=200 --title="Fun Facts" --timeout=30 --image ${LOGO} --text-align=center --skip-taskbar --image-on-top \ 61 | --wrap --no-buttons --center --window-icon=${LOGO} --undecorated --text="\r\rKM4ACK\rFun Facts\r\r \ 62 | He built a copper J-Pole as his first 2M 440 antenna" 63 | 64 | yad --width=400 --height=200 --title="Fun Facts" --timeout=30 --image ${LOGO} --text-align=center --skip-taskbar --image-on-top \ 65 | --wrap --no-buttons --center --window-icon=${LOGO} --undecorated --text="\r\rKM4ACK\rFun Facts\r\r \ 66 | The J-Pole is still in use today" 67 | 68 | yad --width=400 --height=200 --title="Fun Facts" --timeout=30 --image ${LOGO} --text-align=center --skip-taskbar --image-on-top \ 69 | --wrap --no-buttons --center --window-icon=${LOGO} --undecorated --text="\r\rKM4ACK\rFun Facts\r\r \ 70 | He has never had formal computer programming training" 71 | 72 | yad --width=400 --height=200 --title="Fun Facts" --timeout=30 --image ${LOGO} --text-align=center --skip-taskbar --image-on-top \ 73 | --wrap --no-buttons --center --window-icon=${LOGO} --undecorated --text="\r\rKM4ACK\rFun Facts\r\r \ 74 | Yet continues his studies at The School of Hard Knocks" 75 | 76 | yad --width=400 --height=200 --title="Fun Facts" --timeout=30 --image ${LOGO} --text-align=center --skip-taskbar --image-on-top \ 77 | --wrap --no-buttons --center --window-icon=${LOGO} --undecorated --text="\r\rKM4ACK\rFun Facts\r\r \ 78 | He grew up in North Alabama. ROLL TIDE!!" 79 | 80 | yad --width=400 --height=200 --title="Fun Facts" --timeout=30 --image ${LOGO} --text-align=center --skip-taskbar --image-on-top \ 81 | --wrap --no-buttons --center --window-icon=${LOGO} --undecorated --text="\r\rKM4ACK\rFun Facts\r\r \ 82 | He moved to Tennessee after meeting his wife Pj" 83 | 84 | yad --width=400 --height=200 --title="Fun Facts" --timeout=30 --image ${LOGO} --text-align=center --skip-taskbar --image-on-top \ 85 | --wrap --no-buttons --center --window-icon=${LOGO} --undecorated --text="\r\rKM4ACK\rFun Facts\r\r \ 86 | His first radio was a Baofeng that he purchased before he had a license" 87 | 88 | yad --width=400 --height=200 --title="Fun Facts" --timeout=30 --image ${LOGO} --text-align=center --skip-taskbar --image-on-top \ 89 | --wrap --no-buttons --center --window-icon=${LOGO} --undecorated --text="\r\rKM4ACK\rFun Facts\r\r \ 90 | As of June 2020 he owns 9 Raspberry Pi's. All but 1 is in use." 91 | 92 | yad --width=400 --height=200 --title="Fun Facts" --timeout=30 --image ${LOGO} --text-align=center --skip-taskbar --image-on-top \ 93 | --wrap --no-buttons --center --window-icon=${LOGO} --undecorated --text="\r\rKM4ACK\rFun Facts\r\r \ 94 | One pi runs a PBX server over AREDN serving roughly 40 hams VOIP phone service" 95 | 96 | yad --width=400 --height=200 --title="Fun Facts" --timeout=30 --image ${LOGO} --text-align=center --skip-taskbar --image-on-top \ 97 | --wrap --no-buttons --center --window-icon=${LOGO} --undecorated --text="\r\rKM4ACK\rFun Facts\r\r \ 98 | Another pi runs an APRS digipeater" 99 | 100 | yad --width=400 --height=200 --title="Fun Facts" --timeout=30 --image ${LOGO} --text-align=center --skip-taskbar --image-on-top \ 101 | --wrap --no-buttons --center --window-icon=${LOGO} --undecorated --text="\r\rKM4ACK\rFun Facts\r\r \ 102 | His favorite digital mode is JS8Call" 103 | 104 | yad --width=400 --height=200 --title="Fun Facts" --timeout=30 --image ${LOGO} --text-align=center --skip-taskbar --image-on-top \ 105 | --wrap --no-buttons --center --window-icon=${LOGO} --undecorated --text="\r\rKM4ACK\rFun Facts\r\r \ 106 | He got interested in EMCOMM because he lost cell service after a tornado outbreak in his home town" 107 | 108 | yad --width=400 --height=200 --title="Fun Facts" --timeout=30 --image ${LOGO} --text-align=center --skip-taskbar --image-on-top \ 109 | --wrap --no-buttons --center --window-icon=${LOGO} --undecorated --text="\r\rKM4ACK\rFun Facts\r\r \ 110 | He used Windows from 3.1 to WIN10. He now runs a Mac as his \ 111 | work machine and Raspberry Pi's for all things ham radio" 112 | 113 | yad --width=400 --height=200 --title="Fun Facts" --timeout=30 --image ${LOGO} --text-align=center --skip-taskbar --image-on-top \ 114 | --wrap --no-buttons --center --window-icon=${LOGO} --undecorated --text="\r\rKM4ACK\rFun Facts\r\r \ 115 | Two of his favorite ham YouTubers are Ham Radio Crash Course and K8MRD Radio" 116 | 117 | yad --width=400 --height=200 --title="Fun Facts" --timeout=30 --image ${LOGO} --text-align=center --skip-taskbar --image-on-top \ 118 | --wrap --no-buttons --center --window-icon=${LOGO} --undecorated --text="\r\rKM4ACK\rFun Facts\r\r \ 119 | His favorite non ham Youtuber is Wranglerstar" 120 | 121 | yad --width=400 --height=200 --title="Fun Facts" --timeout=30 --image ${LOGO} --text-align=center --skip-taskbar --image-on-top \ 122 | --wrap --no-buttons --center --window-icon=${LOGO} --undecorated --text="\r\rKM4ACK\rFun Facts\r\r \ 123 | Enough about KM4ACK! Go grab a coffee or do something fun while your pi is built" 124 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .vscode/ 2 | config 3 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # THIS PROJECT IS DEPRECATED AND HAS BEEN SUPERSEDED BY [73LINUX](https://github.com/km4ack/73Linux)! 2 | -------------------------------------------------------------------------------- /app-check: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | #this script used to check for apps that need updates 4 | 5 | UPDATEFILE=/run/user/$UID/bapupdate.txt 6 | 7 | #Delete file if exist 8 | if [ -f $UPDATEFILE ]; then 9 | rm $UPDATEFILE 10 | fi 11 | #create new file 12 | touch $UPDATEFILE 13 | 14 | #----------------------------------------------------# 15 | # Hotspot 16 | #----------------------------------------------------# 17 | HOTSPOT="/usr/bin/autohotspotN" 18 | if [ ! -f "$HOTSPOT" ]; then 19 | echo "HOTSPOT=Not_Installed" >> $UPDATEFILE 20 | else 21 | echo "HOTSPOT=Installed" >> $UPDATEFILE 22 | fi 23 | 24 | #remove duplicate HST check 25 | 26 | #----------------------------------------------------# 27 | # AX25 28 | #----------------------------------------------------# 29 | if [ ! -d /etc/ax25 ]; then 30 | echo "AX25=Not_Installed" >> $UPDATEFILE 31 | else 32 | echo "AX25=Installed" >> $UPDATEFILE 33 | fi 34 | #----------------------------------------------------# 35 | # GPS 36 | #----------------------------------------------------# 37 | if ! hash gpsd 2>/dev/null; then 38 | echo "GPS=Not_Installed" >> $UPDATEFILE 39 | else 40 | echo "GPS=Installed" >> $UPDATEFILE 41 | fi 42 | #----------------------------------------------------# 43 | # PULSE 44 | #----------------------------------------------------# 45 | if ! hash pavucontrol 2>/dev/null; then 46 | echo "PULSE=Not_Installed" >> $UPDATEFILE 47 | else 48 | echo "PULSE=Installed" >> $UPDATEFILE 49 | fi 50 | #----------------------------------------------------# 51 | # ARDOP 52 | #----------------------------------------------------# 53 | if [ -f ${HOME}/ardop/piardopc ]; then 54 | echo "ARDOP=Installed" >> $UPDATEFILE 55 | else 56 | echo "ARDOP=Not_Installed" >> $UPDATEFILE 57 | fi 58 | #----------------------------------------------------# 59 | # ARDOP GUI 60 | #----------------------------------------------------# 61 | if [ -f ${HOME}/ardop/piARDOP_GUI ]; then 62 | echo "ARDOPGUI=Installed" >> $UPDATEFILE 63 | else 64 | echo "ARDOPGUI=Not_Installed" >> $UPDATEFILE 65 | fi 66 | #----------------------------------------------------# 67 | # VARA 68 | #----------------------------------------------------# 69 | echo "Checking VARA" 70 | if [ -f ${HOME}/.wine/drive_c/VARA/VARA.exe ]; then 71 | echo "VARA=Installed" >> $UPDATEFILE 72 | else 73 | echo "VARA=Not_Installed" >> $UPDATEFILE 74 | fi 75 | #----------------------------------------------------# 76 | # JS8Call 77 | #----------------------------------------------------# 78 | if ! hash js8call 2>/dev/null; then 79 | echo "JS8=Not_Installed" >> $UPDATEFILE 80 | else 81 | echo "JS8=Installed" >> $UPDATEFILE 82 | fi 83 | #----------------------------------------------------# 84 | # WSJTX 85 | #----------------------------------------------------# 86 | if ! hash wsjtx 2>/dev/null; then 87 | echo "FT8=Not_Installed" >> $UPDATEFILE 88 | else 89 | echo "FT8=Installed" >> $UPDATEFILE 90 | fi 91 | #----------------------------------------------------# 92 | # CONKY 93 | #----------------------------------------------------# 94 | if [ -f ${HOME}/.conkyrc ]; then 95 | echo "CONKY=Installed" >> $UPDATEFILE 96 | else 97 | echo "CONKY=Not_Installed" >> $UPDATEFILE 98 | fi 99 | #----------------------------------------------------# 100 | # M0IAX 101 | #----------------------------------------------------# 102 | if [ -f /usr/local/bin/JS8CallUtils_v2 ]; then 103 | echo "M0IAX=Installed" >> $UPDATEFILE 104 | else 105 | echo "M0IAX=Not_Installed" >> $UPDATEFILE 106 | fi 107 | 108 | #----------------------------------------------------# 109 | # RIG CONTROL - HAMLIB 110 | #----------------------------------------------------# 111 | if ! hash rigctl 2>/dev/null; then 112 | echo "RIG=Not_Installed" >> $UPDATEFILE 113 | else 114 | echo "Checking Rig Control" 115 | RIG=$(rigctl --version | grep Hamlib | sed s/"rigctl(d),\ Hamlib\ "//) 116 | NEWRIG=$(curl -s https://sourceforge.net/projects/hamlib/files/latest/download | 117 | grep -o https://downloads.sourceforge.net/project/hamlib/hamlib/[0-9].[0-9] | 118 | head -n 1 | awk -F "/" '{print $7}') 119 | 120 | if (($(echo "${NEWRIG} ${RIG}" | awk '{print ($1 > $2)}'))); then 121 | echo "RIG=NEEDS-UPDATE" >> $UPDATEFILE 122 | else 123 | echo "RIG=is_latest_version" >> $UPDATEFILE 124 | fi 125 | fi 126 | 127 | #----------------------------------------------------# 128 | # FLDIGI 129 | #----------------------------------------------------# 130 | echo "Checking FLDIGI" 131 | if ! hash fldigi 2>/dev/null; then 132 | echo "FLDIGI=Not_Installed" >> $UPDATEFILE 133 | else 134 | FLDIGI=$(fldigi --version | awk 'FNR == 1 {print $2}') 135 | NEWFLDIGI=$(curl -s https://sourceforge.net/projects/fldigi/files/fldigi/ | 136 | grep .tar.gz | head -1 | awk -F "-" '{print $2}' | awk -F ".tar" '{print $1}') 137 | 138 | if (($(echo "${NEWFLDIGI} ${FLDIGI}" | awk '{print ($1 > $2)}'))); then 139 | echo "FLDIGI=NEEDS-UPDATE" >> $UPDATEFILE 140 | else 141 | echo "FLDIGI=is_latest_version" >> $UPDATEFILE 142 | fi 143 | fi 144 | 145 | #----------------------------------------------------# 146 | # FLWRAP 147 | #----------------------------------------------------# 148 | echo "Checking FLWRAP" 149 | if ! hash flwrap 2>/dev/null; then 150 | echo "FLWRAP=Not_Installed" >> $UPDATEFILE 151 | else 152 | FLWRAP=$(flwrap --version | awk 'FNR == 1 {print $2}') 153 | NEWFLWRAP=$(curl -s http://www.w1hkj.com/files/flwrap/ | grep .tar.gz | sed 's/
  • \ flwrap.*$//' | sed 's/flwrap-//' | sed 's/.tar.gz//') 155 | 156 | if (($(echo "${NEWFLWRAP} ${FLWRAP}" | awk '{print ($1 > $2)}'))); then 157 | echo "FLWRAP=NEEDS-UPDATE" >> $UPDATEFILE 158 | else 159 | echo "FLWRAP=is_latest_version" >> $UPDATEFILE 160 | fi 161 | fi 162 | 163 | #----------------------------------------------------# 164 | # FLRIG 165 | #----------------------------------------------------# 166 | echo "Checking FLRIG" 167 | if ! hash flrig 2>/dev/null; then 168 | echo "FLRIG=Not_Installed" >> $UPDATEFILE 169 | else 170 | FLRIG=$(flrig --version | awk 'FNR == 1 {print $2}') 171 | NEWFLRIG=$(curl -s https://sourceforge.net/projects/fldigi/files/flrig/ | 172 | grep .tar.gz | head -1 | awk -F "-" '{print $2}' | awk -F ".tar.gz" '{print $1}') 173 | 174 | if (($(echo "${NEWFLRIG} ${FLRIG}" | awk '{print ($1 > $2)}'))); then 175 | echo "FLRIG=NEEDS-UPDATE" >> $UPDATEFILE 176 | else 177 | echo "FLRIG=is_latest_version" >> $UPDATEFILE 178 | fi 179 | fi 180 | #----------------------------------------------------# 181 | # FLAMP 182 | #----------------------------------------------------# 183 | echo "Checking FLAMP" 184 | if ! hash flamp 2>/dev/null; then 185 | echo "FLAMP=Not_Installed" >> $UPDATEFILE 186 | else 187 | FLAMP=$(flamp --version | awk 'FNR == 1 {print $2}') 188 | NEWFLAMP=$(curl -s https://sourceforge.net/projects/fldigi/files/flamp/ | 189 | grep .tar.gz | head -1 | awk -F "-" '{print $2}' | awk -F ".tar.gz" '{print $1}') 190 | 191 | if (($(echo "${NEWFLAMP} ${FLAMP}" | awk '{print ($1 > $2)}'))); then 192 | echo "FLAMP=NEEDS-UPDATE" >> $UPDATEFILE 193 | else 194 | echo "FLAMP=is_latest_version" >> $UPDATEFILE 195 | fi 196 | fi 197 | #----------------------------------------------------# 198 | # FLMSG 199 | #----------------------------------------------------# 200 | echo "Checking FLMSG" 201 | if ! hash flmsg 2>/dev/null; then 202 | echo "FLMSG=Not_Installed" >> $UPDATEFILE 203 | else 204 | FLMSG=$(flmsg --version | awk 'FNR == 1 {print $2}') 205 | NEWFLMSG=$(curl -s https://sourceforge.net/projects/fldigi/files/flmsg/ | 206 | grep .tar.gz | head -1 | awk -F "-" '{print $2}' | awk -F ".tar.gz" '{print $1}') 207 | 208 | if (($(echo "${NEWFLMSG} ${FLMSG}" | awk '{print ($1 > $2)}'))); then 209 | echo "FLMSG=NEEDS-UPDATE" >> $UPDATEFILE 210 | else 211 | echo "FLMSG=is_latest_version" >> $UPDATEFILE 212 | fi 213 | fi 214 | #----------------------------------------------------# 215 | # FLNET 216 | #----------------------------------------------------# 217 | echo "Checking FLNET" 218 | if ! hash flnet 2>/dev/null; then 219 | echo "FLNET=Not_Installed" >> $UPDATEFILE 220 | else 221 | FLNET=$(flnet --version | awk 'FNR == 1 {print $2}') 222 | NEWFLNET=$(curl -s https://sourceforge.net/projects/fldigi/files/flnet/ | 223 | grep .tar.gz | head -1 | awk -F "-" '{print $2}' | awk -F ".tar" '{print $1}') 224 | 225 | if (($(echo "${NEWFLNET} ${FLNET}" | awk '{print ($1 > $2)}'))); then 226 | echo "FLNET=NEEDS-UPDATE" >> $UPDATEFILE 227 | else 228 | echo "FLNET=is_latest_version" >> $UPDATEFILE 229 | fi 230 | fi 231 | #----------------------------------------------------# 232 | # Pat Winlink 233 | #----------------------------------------------------# 234 | echo "Checking Pat Winlink" 235 | if ! hash pat 2>/dev/null; then 236 | echo "PAT=Not_Installed" >> $UPDATEFILE 237 | else 238 | PAT=$(pat version | awk '{print $2}' | sed 's/v//' | sed 's/0\.//') 239 | NEWPATV=$(curl -s https://github.com/la5nta/pat/releases | grep armhf | head -1 | sed 's/.*pat_/pat_/' | sed 's/<\/a>.*$//') 240 | NEWPAT=$(echo ${NEWPATV} | sed 's/pat_//' | sed 's/_linux_armhf.deb//' | sed 's/0\.//') 241 | VERTEST=$(echo "${NEWPAT}>${PAT}" | bc) 242 | 243 | if [ "$VERTEST" = 1 ]; then 244 | echo "PAT=NEEDS-UPDATE" >> $UPDATEFILE 245 | else 246 | echo "PAT=is_latest_version" >> $UPDATEFILE 247 | fi 248 | fi 249 | #----------------------------------------------------# 250 | # CHRIP 251 | #----------------------------------------------------# 252 | echo "Checking Chirp" 253 | #as of 02FEB23 running "chirp --version" no longer gives the version number 254 | #but instead starts chirp. Mods were made below to simply check if chirp 255 | #is installed or not 256 | if ! hash chirp 2>/dev/null; then 257 | echo "CHIRP=Not_Installed" >> $UPDATEFILE 258 | else 259 | echo "Installed" >> $UPDATEFILE 260 | 261 | fi 262 | 263 | 264 | #bash function this could be moved to the top of the file and used globally 265 | #to short hand lookups on GIT release pages 266 | #lastrelease() { git ls-remote --tags "$1" | cut -d/ -f3- | tail -n1; } 267 | 268 | #----------------------------------------------------# 269 | # DIREWOLF 270 | #----------------------------------------------------# 271 | echo "Checking Direwolf" 272 | if ! hash direwolf 2>/dev/null; then 273 | echo "DIRE=Not_Installed" >> $UPDATEFILE 274 | else 275 | DIRE=$(direwolf -S -t 0 | head -1 | sed 's/Dire\ Wolf\ version\ //') 276 | wget -P /tmp/ https://raw.githubusercontent.com/wb2osz/direwolf/master/CHANGES.md >/dev/null 2>&1 277 | NEWDIRE=$(cat /tmp/CHANGES.md | head -5 | tail -1 | awk '{ print $3 }') 278 | 279 | if (($(echo "${NEWDIRE} ${DIRE}" | awk '{print ($1 > $2)}'))); then 280 | echo "DIRE=NEEDS-UPDATE" >> $UPDATEFILE 281 | else 282 | echo "DIRE=is_latest_version" >> $UPDATEFILE 283 | fi 284 | fi 285 | #----------------------------------------------------# 286 | # Pat Menu 287 | #----------------------------------------------------# 288 | echo "Checking Pat Menu" 289 | if [ ! -d ${HOME}/patmenu2 ]; then 290 | echo "PATMENU=Not_Installed" >> $UPDATEFILE 291 | else 292 | cd ${HOME}/patmenu2/ || ! echo "Failure" 293 | wget -O ${HOME}/patmenu2/latest https://raw.githubusercontent.com/km4ack/patmenu2/master/changelog >/dev/null 2>&1 294 | LATEST=$(cat ${HOME}/patmenu2/latest | grep '^release' | sed 's/release=//') 295 | CURRENT=$(cat ${HOME}/patmenu2/changelog | grep '^release' | sed 's/release=//') 296 | rm ${HOME}/patmenu2/latest >/dev/null 2>&1 297 | if (($(echo "${LATEST} ${CURRENT}" | awk '{print ($1 > $2)}'))); then 298 | echo "PATMENU=NEEDS-UPDATE" >> $UPDATEFILE 299 | else 300 | echo "PATMENU=is_latest_version" >> $UPDATEFILE 301 | fi 302 | fi 303 | 304 | #----------------------------------------------------# 305 | # Hot Spot Tools 306 | #----------------------------------------------------# 307 | if [ ! -d ${HOME}/hotspot-tools2 ]; then 308 | echo "HSTOOLS=Not_Installed" >> $UPDATEFILE 309 | else 310 | CURRENT=$(cat ${HOME}/hotspot-tools2/changelog | grep version= | sed 's/version=//') 311 | LATEST=$(curl -s https://raw.githubusercontent.com/km4ack/hotspot-tools2/master/changelog | grep version= | sed 's/version=//') 312 | if (($(echo "${LATEST} ${CURRENT}" | awk '{print ($1 > $2)}'))); then 313 | echo "HSTOOLS=NEEDS-UPDATE" >> $UPDATEFILE 314 | else 315 | echo "HSTOOLS=is_latest_version" >> $UPDATEFILE 316 | fi 317 | fi 318 | 319 | #----------------------------------------------------# 320 | # GARIM 321 | #----------------------------------------------------# 322 | echo "Checking GARIM" 323 | if ! hash garim 2>/dev/null; then 324 | echo "GARIM=Not_Installed" >> $UPDATEFILE 325 | else 326 | GARIM=$(garim --version | head -n1 | awk -F ' ' '{print $2}') 327 | NEWGARIM=$(curl -s https://www.whitemesa.net/garim/garim.html | grep -m 1 \ 328 | "armv7l.tar.gz" | awk -F '-' '{print $2}') 329 | if (($(echo "${NEWGARIM} ${GARIM}" | awk '{print ($1 > $2)}'))); then 330 | echo "GARIM=NEEDS-UPDATE" >> $UPDATEFILE 331 | else 332 | echo "GARIM=is_latest_version" >> $UPDATEFILE 333 | fi 334 | fi 335 | 336 | #----------------------------------------------------# 337 | # VARIM 338 | #----------------------------------------------------# 339 | echo "Checking VARIM" 340 | if ! hash varim 2>/dev/null; then 341 | echo "VARIM=Not_Installed" >> $UPDATEFILE 342 | else 343 | VARIM=$(varim --version | head -n1 | awk -F ' ' '{print $2}') 344 | NEWVARIM=$(curl -s https://www.whitemesa.net/varim/varim.html | grep -m 1 \ 345 | "armv7l.tar.gz" | awk -F '-' '{print $2}') 346 | if (($(echo "${NEWVARIM} ${VARIM}" | awk '{print ($1 > $2)}'))); then 347 | echo "VARIM=NEEDS-UPDATE" >> $UPDATEFILE 348 | else 349 | echo "VARIM=is_latest_version" >> $UPDATEFILE 350 | fi 351 | fi 352 | 353 | #----------------------------------------------------# 354 | # XASTIR 355 | #----------------------------------------------------# 356 | echo "Checking Xastir" 357 | if ! hash xastir 2>/dev/null; then 358 | echo "XASTIR=Not_Installed" >> $UPDATEFILE 359 | else 360 | LATESTXAS=$(curl -s https://github.com/Xastir/Xastir | grep Release- | head -1 | sed 's/.*Release-//;s/">//') 361 | CURRENTXAS=$(xastir -V | sed 's/Xastir V//;s/(.*//;/^\s*$/d') 362 | 363 | if (($(echo "${LATESTXAS} ${CURRENTXAS}" | awk '{print ($1 > $2)}'))); then 364 | echo "XASTIR=NEEDS-UPDATE" >> $UPDATEFILE 365 | else 366 | echo "XASTIR=is_latest_version" >> $UPDATEFILE 367 | fi 368 | fi 369 | 370 | #----------------------------------------------------# 371 | # YAAC 372 | #----------------------------------------------------# 373 | YAAC="${HOME}/YAAC" 374 | echo "Checking YAAC for updates" 375 | if [ ! -d "$YAAC" ]; then 376 | echo "YAAC=Not_Installed" >> $UPDATEFILE 377 | else 378 | 379 | CURYAAC=$(java -jar ${HOME}/YAAC/YAAC.jar -version | grep beta | sed 's/.*beta//;s/(.*//') 380 | wget -q https://sourceforge.net/projects/yetanotheraprsc/files/YAACBuildLabel.txt -O /run/user/${UID}/latestyaac.txt 381 | LATESTYAAC=$(cat /run/user/${UID}/latestyaac.txt | sed 's/1.0-beta//;s/(.*//') 382 | if (($(echo "${LATESTYAAC} ${CURYAAC}" | awk '{print ($1 > $2)}'))); then 383 | echo "YAAC=NEEDS-UPDATE" >> $UPDATEFILE 384 | else 385 | echo "YAAC=is_latest_version" >> $UPDATEFILE 386 | fi 387 | fi 388 | 389 | #----------------------------------------------------# 390 | # PYQSO 391 | #----------------------------------------------------# 392 | if ! hash pyqso 2>/dev/null; then 393 | echo "PYQSO=Not_Installed" >> $UPDATEFILE 394 | else 395 | echo "PYQSO=Installed" >> $UPDATEFILE 396 | fi 397 | 398 | #----------------------------------------------------# 399 | # QSSTV 400 | #----------------------------------------------------# 401 | if ! hash qsstv 2>/dev/null; then 402 | echo "QSSTV=Not_Installed" >> $UPDATEFILE 403 | else 404 | echo "QSSTV=Installed" >> $UPDATEFILE 405 | fi 406 | 407 | #----------------------------------------------------# 408 | # GRIDTRACKER 409 | #----------------------------------------------------# 410 | GT="${HOME}/GridTracker" 411 | if [ ! -d "$GT" ]; then 412 | echo "GRIDTRACK=Not_Installed" >> $UPDATEFILE 413 | else 414 | echo "GRIDTRACK=Installed" >> $UPDATEFILE 415 | fi 416 | 417 | #----------------------------------------------------# 418 | # PROPAGATION 419 | #----------------------------------------------------# 420 | if ! hash voacapl 2>/dev/null; then 421 | echo "PROP=Not_Installed" >> $UPDATEFILE 422 | else 423 | echo "PROP=Installed" >> $UPDATEFILE 424 | fi 425 | 426 | #----------------------------------------------------# 427 | # CQRLOG 428 | #----------------------------------------------------# 429 | if ! hash cqrlog 2>/dev/null; then 430 | echo "CQRLOG=Not_Installed" >> $UPDATEFILE 431 | else 432 | echo "CQRLOG=Installed" >> $UPDATEFILE 433 | fi 434 | 435 | #----------------------------------------------------# 436 | # EES 437 | #----------------------------------------------------# 438 | if [ -f /var/www/html/email.php ]; then 439 | echo "EES=Installed" >> $UPDATEFILE 440 | else 441 | echo "EES=Not_Installed" >> $UPDATEFILE 442 | fi 443 | 444 | #----------------------------------------------------# 445 | # Pi-APRS 446 | #----------------------------------------------------# 447 | if [ -d ${HOME}/Pi-APRS ]; then 448 | echo "PIAPRS=Installed" >> $UPDATEFILE 449 | else 450 | echo "PIAPRS=Not_Installed" >> $UPDATEFILE 451 | fi 452 | 453 | #----------------------------------------------------# 454 | # Temp Convert 455 | #----------------------------------------------------# 456 | if [ -f ${HOME}/bin/converttemp ]; then 457 | echo "TEMPCONVERT=Installed" >> $UPDATEFILE 458 | else 459 | echo "TEMPCONVERT=Not_Installed" >> $UPDATEFILE 460 | fi 461 | 462 | #----------------------------------------------------# 463 | # GPARTED 464 | #----------------------------------------------------# 465 | if ! hash gparted 2>/dev/null; then 466 | echo "GPARTED=Not_Installed" >> $UPDATEFILE 467 | else 468 | echo "GPARTED=Installed" >> $UPDATEFILE 469 | fi 470 | 471 | #----------------------------------------------------# 472 | # DIPOLE CALCULATOR 473 | #----------------------------------------------------# 474 | if [ -f ${HOME}/bin/dipole ]; then 475 | echo "DIPOLE=Installed" >> $UPDATEFILE 476 | else 477 | echo "DIPOLE=Not_Installed" >> $UPDATEFILE 478 | fi 479 | 480 | #----------------------------------------------------# 481 | # SHOWLOG | Log file viewer 482 | #----------------------------------------------------# 483 | if [ -f ${HOME}/bin/showlog ]; then 484 | echo "SHOWLOG=Installed" >> $UPDATEFILE 485 | else 486 | echo "SHOWLOG=Not_Installed" >> $UPDATEFILE 487 | fi 488 | 489 | #----------------------------------------------------# 490 | # Call Sign Lookup GETCALL 491 | #----------------------------------------------------# 492 | if [ -f ${HOME}/bin/getcall ]; then 493 | echo "CALLSIGN=Installed" >> $UPDATEFILE 494 | else 495 | echo "CALLSIGN=Not_Installed" >> $UPDATEFILE 496 | fi 497 | 498 | #----------------------------------------------------# 499 | # HamClock 500 | #----------------------------------------------------# 501 | HAMCLOCK=$(ls /usr/local/bin | grep hamclock) 502 | if [ -n "$HAMCLOCK" ]; then 503 | echo "HAMCLOCK=Installed" >> $UPDATEFILE 504 | else 505 | echo "HAMCLOCK=Not_Installed" >> $UPDATEFILE 506 | fi 507 | 508 | #----------------------------------------------------# 509 | # Real Time Clock 510 | #----------------------------------------------------# 511 | echo "RTC=Unknown" >> $UPDATEFILE 512 | 513 | #----------------------------------------------------# 514 | # Gpredict 515 | #----------------------------------------------------# 516 | if ! hash gpredict 2>/dev/null; then 517 | echo "GPREDICT=Not_Installed" >> $UPDATEFILE 518 | else 519 | echo "GPREDICT=Installed" >> $UPDATEFILE 520 | fi 521 | 522 | #----------------------------------------------------# 523 | # TQSL 524 | #----------------------------------------------------# 525 | if ! hash tqsl 2>/dev/null; then 526 | echo "TQSL=Not_Installed" >> $UPDATEFILE 527 | else 528 | echo "TQSL=Installed" >> $UPDATEFILE 529 | fi 530 | 531 | #----------------------------------------------------# 532 | # PISTATS 533 | #----------------------------------------------------# 534 | if ! hash pistats 2>/dev/null; then 535 | echo "PISTATS=Not_Installed" >> $UPDATEFILE 536 | else 537 | echo "PISTATS=Installed" >> $UPDATEFILE 538 | fi 539 | 540 | #----------------------------------------------------# 541 | # XLOG CHECK 542 | #----------------------------------------------------# 543 | if ! hash xlog 2>/dev/null; then 544 | echo "XLOG=Not_Installed" >> $UPDATEFILE 545 | else 546 | 547 | XLOGCUR=$(xlog -version | sed 's/xlog\ version\ //') 548 | 549 | XLOGLATEST=$(curl -s https://download.savannah.nongnu.org/releases/xlog/ | 550 | grep "2.[0-9].[0-9][0-9].tar" | sort | tail -1 | sed 's/.*xlog/xlog/' | sed 's/.sig.*$//' | 551 | sed 's/xlog-//' | sed 's/.tar.gz//') 552 | 553 | if (($(echo "${XLOGLATEST} ${XLOGCUR}" | awk '{print ($1 > $2)}'))); then 554 | echo "XLOG=NEEDS-UPDATE" >> $UPDATEFILE 555 | else 556 | echo "XLOG=is_latest_version" >> $UPDATEFILE 557 | fi 558 | fi 559 | 560 | #----------------------------------------------------# 561 | # JTDX 562 | #----------------------------------------------------# 563 | if ! hash jtdx 2>/dev/null; then 564 | echo "JTDX=Not_Installed" >> $UPDATEFILE 565 | else 566 | echo "JTDX=Installed" >> $UPDATEFILE 567 | fi 568 | 569 | #----------------------------------------------------# 570 | # TELNET 571 | #----------------------------------------------------# 572 | if ! hash telnet 2>/dev/null; then 573 | echo "TEL=Not_Installed" >> $UPDATEFILE 574 | else 575 | echo "TEL=Installed" >> $UPDATEFILE 576 | fi 577 | 578 | #----------------------------------------------------# 579 | # piQtTermTCP 580 | #----------------------------------------------------# 581 | if [ -f /usr/local/bin/piQtTermTCP ]; then 582 | echo "PITERM=Installed" >> $UPDATEFILE 583 | else 584 | echo "PITERM=Not_Installed" >> $UPDATEFILE 585 | fi 586 | 587 | #----------------------------------------------------# 588 | # Security Tools 589 | #----------------------------------------------------# 590 | if [ -f /usr/local/bin/securefile ]; then 591 | echo "SECURITY=Installed" >> $UPDATEFILE 592 | else 593 | echo "SECURITY=Not_Installed" >> $UPDATEFILE 594 | fi 595 | 596 | #----------------------------------------------------# 597 | # YGATE 598 | #----------------------------------------------------# 599 | YGATE="${HOME}/bin/ygate.py" 600 | if [ ! -f "$YGATE" ]; then 601 | echo "YGATE=Not_Installed" >> $UPDATEFILE 602 | else 603 | echo "YGATE=Installed" >> $UPDATEFILE 604 | fi 605 | 606 | #----------------------------------------------------# 607 | # BPQ 608 | #----------------------------------------------------# 609 | BPQ="${HOME}/linbpq/linbpq" 610 | if [ ! -f "$BPQ" ]; then 611 | echo "BPQ=Not_Installed" >> $UPDATEFILE 612 | else 613 | echo "BPQ=Installed" >> $UPDATEFILE 614 | fi 615 | 616 | #----------------------------------------------------# 617 | # Battery Test Script :: BATT 618 | #----------------------------------------------------# 619 | BATT="${HOME}/bin/batt-test" 620 | if [ ! -f "$BATT" ]; then 621 | echo "BATT=Not_Installed" >> $UPDATEFILE 622 | else 623 | echo "BATT=Installed" >> $UPDATEFILE 624 | fi 625 | 626 | #----------------------------------------------------# 627 | # VNC Viewer 628 | #----------------------------------------------------# 629 | if ! hash vncviewer 2>/dev/null; then 630 | echo "VNC=Not_Installed" >> $UPDATEFILE 631 | else 632 | echo "VNC=Installed" >> $UPDATEFILE 633 | fi 634 | 635 | #----------------------------------------------------# 636 | # XYGRIB Viewer 637 | #----------------------------------------------------# 638 | if [ -f /usr/bin/XyGrib ]; then 639 | echo "XYGRIB=Installed" >> $UPDATEFILE 640 | else 641 | echo "XYGRIB=Not_Installed" >> $UPDATEFILE 642 | fi 643 | 644 | #----------------------------------------------------# 645 | # GPS UPDATE TOOL 646 | #----------------------------------------------------# 647 | echo "Checking GPS Update Tool" 648 | if [ ! -f ${HOME}/bin/gpsupdate ]; then 649 | echo "GPSUPDATE=Not_Installed" >> $UPDATEFILE 650 | else 651 | GPSUPDATE=$(grep VERSION= ${HOME}/bin/gpsupdate | sed 's/VERSION=//') 652 | NEWGPSUPDATE=$(curl -s https://raw.githubusercontent.com/km4ack/pi-scripts/master/gpsupdate | grep VERSION= | sed 's/VERSION=//') 653 | if (($(echo "${NEWGPSUPDATE} ${GPSUPDATE}" | awk '{print ($1 > $2)}'))); then 654 | echo "GPSUPDATE=NEEDS-UPDATE" >> $UPDATEFILE 655 | else 656 | echo "GPSUPDATE=is_latest_version" >> $UPDATEFILE 657 | fi 658 | fi 659 | 660 | #----------------------------------------------------# 661 | # Grid Calc 662 | #----------------------------------------------------# 663 | echo "Checking Grid Calc" 664 | if [ ! -f $HOME/bin/grid-calc ]; then 665 | echo "GRIDCALC=Not_Installed" >> $UPDATEFILE 666 | else 667 | CURRENT=$(grep VERSION $HOME/bin/grid-calc | head -1 | sed 's/VERSION=//') 668 | LATEST=$(curl -s https://raw.githubusercontent.com/km4ack/pi-scripts/master/grid-calc | grep VERSION | head -1 | sed 's/VERSION=//') 669 | if (($(echo "${LATEST} ${CURRENT}" | awk '{print ($1 > $2)}'))); then 670 | echo "GRIDCALC=NEEDS-UPDATE" >> $UPDATEFILE 671 | else 672 | echo "GRIDCALC=is_latest_version" >> $UPDATEFILE 673 | fi 674 | fi 675 | 676 | #----------------------------------------------------# 677 | # HAMRS 678 | #----------------------------------------------------# 679 | if [ ! -f /usr/local/bin/hamrs ]; then 680 | echo "HAMRS=Not_Installed" >> $UPDATEFILE 681 | else 682 | echo "HAMRS=Installed" >> $UPDATEFILE 683 | fi 684 | 685 | #----------------------------------------------------# 686 | # PacketSearch 687 | #----------------------------------------------------# 688 | echo "Checking Packet Search" 689 | if [ ! -f $HOME/bin/packetsearch ]; then 690 | echo "PACKETSEARCH=Not_Installed" >> $UPDATEFILE 691 | else 692 | PACKETSEARCH=$(grep VERSION /home/pi/bin/packetsearch | sed 's/VERSION=//' | head -n1) 693 | NEWPACKETSEARCH=$(curl -s https://raw.githubusercontent.com/km4ack/pi-scripts/master/packetsearch | grep VERSION | sed 's/VERSION=//' | head -n1) 694 | 695 | if (($(echo "${NEWPACKETSEARCH} ${PACKETSEARCH}" | awk '{print ($1 > $2)}'))); then 696 | echo "PACKETSEARCH=NEEDS-UPDATE" >> $UPDATEFILE 697 | else 698 | echo "PACKETSEARCH=is_latest_version" >> $UPDATEFILE 699 | fi 700 | fi 701 | 702 | #----------------------------------------------------# 703 | # piQtSoundModem 704 | #----------------------------------------------------# 705 | if [ -f /usr/local/bin/piQtSoundModem ]; then 706 | echo "QTSOUND=Installed" >> $UPDATEFILE 707 | else 708 | echo "QTSOUND=Not_Installed" >> $UPDATEFILE 709 | fi 710 | 711 | #----------------------------------------------------# 712 | # Repeater-Start 713 | #----------------------------------------------------# 714 | echo "Checking Repeater-Start" 715 | REPEAT_CURRENT_VER=$(dpkg --list | grep repeater-start | awk '{print $3}') 716 | REPEAT_LATEST=$(curl -s https://sourceforge.net/projects/repeater-start/files/ | grep all.deb | head -1 | sed 's/.*repeater/repeater/;s/".*//') 717 | REPEAT_LATEST_VER=$(echo $REPEAT_LATEST | sed 's/repeater-start_//;s/_.*//') 718 | 719 | if [ -z "$REPEAT_CURRENT_VER" ]; then 720 | echo "REPEAT=Not_Installed" >> $UPDATEFILE 721 | elif (($(echo "${REPEAT_LATEST_VER} ${REPEAT_CURRENT_VER}" | awk '{print ($1 > $2)}'))); then 722 | echo "REPEAT=NEEDS-UPDATE" >> $UPDATEFILE 723 | else 724 | echo "REPEAT=is_latest_version" >> $UPDATEFILE 725 | fi 726 | 727 | -------------------------------------------------------------------------------- /bap-wallpaper.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/km4ack/pi-build/e7e42c4cb5643c0eceb1ae82e11c36925101b78f/bap-wallpaper.jpg -------------------------------------------------------------------------------- /build-a-pi: -------------------------------------------------------------------------------- 1 | ################################################################## 2 | # # 3 | # # # # # # # ##### # # # 4 | # # # # # # # ## # # # # # # 5 | # # # # # # # # # # # # # # 6 | # ## # # ##### ####### # ## # 7 | # # # # # # # # # # # # 8 | # # # # # # # # # # # # 9 | # # # # # # # # ##### # # # 10 | # # 11 | ################################################################## 12 | #20200620 13 | 14 | DESK=$(printenv | grep DISPLAY) 15 | MYPATH="$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null 2>&1 && pwd)" 16 | LOGO=${MYPATH}/logo.png 17 | RB=${HOME}/.config/KM4ACK 18 | BASE=${MYPATH}/base.txt 19 | ADDITIONAL=${MYPATH}/additional.txt 20 | UTILITY=${MYPATH}/utility.txt 21 | FLSUITE=${MYPATH}/flsuite.txt 22 | CONFIG=${MYPATH}/config 23 | FUNCTIONS=${MYPATH}/functions 24 | TEMPCRON=${MYPATH}/cron.tmp 25 | DIR=${MYPATH}/temp 26 | WHO=$(whoami) 27 | VERSION=$(grep "version=" ${MYPATH}/changelog | sed 's/version=//') 28 | DATE=$(date) 29 | 30 | FINISH() { 31 | if [ -f "${BASE}" ]; then 32 | rm ${BASE} 33 | fi 34 | 35 | if [ -f "${ADDITIONAL}" ]; then 36 | rm ${ADDITIONAL} 37 | fi 38 | 39 | if [ -f "${FLSUITE}" ]; then 40 | rm ${FLSUITE} 41 | fi 42 | 43 | if [ -f "${UTILITY}" ]; then 44 | rm ${UTILITY} 45 | fi 46 | } 47 | 48 | trap FINISH EXIT 49 | 50 | #check for display. can't run from SSH 51 | if [ -z "$DESK" ]; then 52 | cat <${NOTICEPATH}/intro.txt 81 | Build a Pi 3.2.0 and later does not support 82 | RaspiOS Buster or earlier versions of RaspiOS. 83 | You should consider upgrading to RaspiOS 11 84 | (Bullseye). By clicking ok you will be moved 85 | to the last version of Build a Pi (3.1.4) that 86 | supports Pi OS Buster. Please note there are 87 | no plans to update Build a Pi for Buster going 88 | forward. In other words, you are on your own 89 | if it is broke and you are still running Pi OS 90 | 10 (Buster). 91 | 92 | EOF 93 | 94 | INTRO=$(yad --width=600 --height=300 --text-align=center --center --title="Out of Date OS Detected!" --show-uri \ 95 | --image ${LOGO} --window-icon=${LOGO} --image-on-top --separator="|" --item-separator="|" \ 96 | --text-info \ 97 | --button="OK":1 <${NOTICEPATH}/intro.txt \ 98 | --button="Exit":2 \ 99 | >/dev/null 2>&1) 100 | BUT=$? 101 | echo $BUT 102 | if [ $BUT = 2 ] || [ $BUT = 252 ]; then 103 | exit 104 | fi 105 | rm ${NOTICEPATH}/intro.txt 106 | cd $HOME/pi-build 107 | git checkout buster 108 | bash build-a-pi & exit 109 | fi 110 | 111 | ##################################### 112 | # end Old OS Check 113 | ##################################### 114 | 115 | #install YAD & jq as needed 116 | clear 117 | echo 118 | echo 119 | echo "#######################################" 120 | echo "# Updating repository & installing #" 121 | echo "# a few needed items before we begin #" 122 | echo "#######################################" 123 | sudo apt-get update 124 | if ! hash yad 2>/dev/null; then 125 | sudo apt install -y yad 126 | fi 127 | if ! hash jq 2>/dev/null; then 128 | sudo apt install -y jq 129 | fi 130 | if ! hash bc >/dev/null; then 131 | sudo apt install -y bc 132 | fi 133 | #an issue pops up every now and again concerning xterm. 134 | #link lxterminal to xterm. see https://github.com/km4ack/pi-build/issues/34 135 | sudo ln -s /usr/bin/lxterminal /usr/bin/xterm 136 | 137 | ##################################### 138 | # Check if run before 139 | ##################################### 140 | if [ -f "${RB}" ]; then 141 | bash ${MYPATH}/update & 142 | exit 143 | fi 144 | ##################################### 145 | # Check user is pi 146 | ##################################### 147 | #This section commented out 12APRIL2022 for testing. Should be removed once testing is complete. 148 | #if [ "$WHO" != 'pi' ]; then 149 | # yad --form --width=500 --text-align=center --center --title="Build-a-Pi" --text-align=center \ 150 | # --image ${LOGO} --window-icon=${LOGO} --image-on-top --separator="|" --item-separator="|" \ 151 | # --text="USER NAME IS NOT PI\rThis script is designed to be run as the pi user. Please set the user name to pi \ 152 | #and try again. You can change the user name after the build is complete but some configuration may not work \ 153 | #as expected" \ 154 | # --button=gtk-close 155 | # exit 1 156 | #fi 157 | ##################################### 158 | # notice to user 159 | ##################################### 160 | cat <${MYPATH}/intro.txt 161 | This script takes approximately 4 hours to complete 162 | if you choose to install everything. If you find it 163 | helpful please consider a donation to encourage future 164 | development. 165 | 166 | https://paypal.me/km4ack 167 | EOF 168 | 169 | INTRO=$(yad --width=550 --height=250 --text-align=center --center --title="Build-a-Pi" --show-uri \ 170 | --image ${LOGO} --window-icon=${LOGO} --image-on-top --separator="|" --item-separator="|" \ 171 | --text-info \ 172 | --button="Continue":2 <${MYPATH}/intro.txt \ 173 | >/dev/null 2>&1) 174 | BUT=$? 175 | if [ ${BUT} = 252 ]; then 176 | rm ${MYPATH}/intro.txt 177 | exit 178 | fi 179 | rm ${MYPATH}/intro.txt 180 | ##################################### 181 | # Create autostart dir 182 | #used to autostart conky at boot 183 | ##################################### 184 | mkdir -p ${HOME}/.config/autostart 185 | 186 | ##################################### 187 | # Get User Call 188 | ##################################### 189 | CALL() { 190 | INFO=$(yad --form --width=420 --text-align=center --center --title="Build-a-Pi" \ 191 | --image ${LOGO} --window-icon=${LOGO} --image-on-top --separator="|" --item-separator="|" \ 192 | --text="version $VERSION" \ 193 | --field="Call Sign*" \ 194 | --field="* Required":LBL \ 195 | --button="Continue":2) 196 | BUT=$? 197 | if [ ${BUT} = 252 ]; then 198 | exit 199 | fi 200 | } 201 | CALL 202 | CALL=$(echo ${INFO} | awk -F "|" '{print $1}') 203 | CALL=${CALL^^} 204 | 205 | #Verify call not empty 206 | ATTEMPTS=0 207 | while [ -z "$CALL" ]; do 208 | if [ $ATTEMPTS -eq 3 ]; then 209 | yad --form --width=420 --text-align=center --center --title="Build-a-Pi" --text-align=center \ 210 | --image ${LOGO} --window-icon=${LOGO} --image-on-top --separator="|" --item-separator="|" \ 211 | --text="Empty callsign after 3 attempts. Quiting!" \ 212 | --button=gtk-ok 213 | exit 214 | fi 215 | 216 | yad --form --width=420 --text-align=center --center --title="Build-a-Pi" --text-align=center \ 217 | --image ${LOGO} --window-icon=${LOGO} --image-on-top --separator="|" --item-separator="|" \ 218 | --text="Call Can't be Blank" \ 219 | --button=gtk-ok 220 | 221 | ((ATTEMPTS = ATTEMPTS + 1)) 222 | CALL 223 | CALL=$(echo ${INFO} | awk -F "|" '{print $1}') 224 | CALL=${CALL^^} 225 | done 226 | 227 | echo "CALL=$CALL" >${CONFIG} 228 | 229 | ##################################### 230 | # Base Apps 231 | ##################################### 232 | yad --center --list --checklist --width=600 --height=600 --separator="" \ 233 | --image ${LOGO} --column=Check --column=App --column=Description \ 234 | --print-column=2 --window-icon=${LOGO} --image-on-top --text-align=center \ 235 | --text="Base Applications" --title="Build-a-Pi" \ 236 | false "HOTSPOT" "Hot Spot Generator for Portable Ops" \ 237 | false "HSTOOLS" "Tools to Manage Hot Spot" \ 238 | false "GPS" "GPS Software" \ 239 | false "GPSUPDATE" "Tool to Manage GPS Devices" \ 240 | false "ARDOP" "Modem for HF" \ 241 | false "ARDOPGUI" "GUI for ARDOP" \ 242 | false "VARA" "VARA Modem - Pi 4 Required" \ 243 | false "HAMLIB" "Needed for Rig Control" \ 244 | false "DIREWOLF" "Software TNC" \ 245 | false "AX25" "Data Link Layer Protocol" \ 246 | false "PULSE" "Pulse Audio Control Interface" \ 247 | --button="Exit":1 \ 248 | --button="Check All and Continue":3 \ 249 | --button="Next":2 >${BASE} 250 | BUT=$? 251 | if [ ${BUT} = 252 ] || [ ${BUT} = 1 ]; then 252 | exit 253 | fi 254 | 255 | if [ ${BUT} = 3 ]; then 256 | BASEAPPS=(HOTSPOT HSTOOLS GPS ARDOP ARDOPGUI VARA HAMLIB DIREWOLF AX25 PULSE GPSUPDATE) 257 | for i in "${BASEAPPS[@]}"; do 258 | echo "$i" >>${BASE} 259 | done 260 | fi 261 | 262 | #If VARA is chosen, make sure we have a Pi 4 32 bit system to work with. 263 | #As of 02OCT2022 the VARA installer only works with the Pi 4. 264 | VARA_CHK=$(grep VARA ${BASE}) 265 | if [ -n "$VARA_CHK" ]; then 266 | FREEMEM=$(free -m | grep Mem: | awk '{ print $2 }') 267 | if [ $FREEMEM -lt 1500 ]; then 268 | echo "Not enough memory available" 269 | yad --form --width=500 --text-align=center --center --title="Build-a-Pi" --text-align=center \ 270 | --image ${LOGO} --window-icon=${LOGO} --image-on-top --separator="|" --item-separator="|" \ 271 | --text="Not enough memory\rVARA requires a Pi 4.\r\rVARA will not be installed during the build." \ 272 | --button=gtk-ok 273 | sed -i 's/VARA//;/^$/d' ${BASE} 274 | fi 275 | 276 | fi 277 | 278 | #check if hotspot is chosen for install & get info if needed 279 | HS=$(grep "HOTSPOT" ${BASE}) 280 | if [ -n "$HS" ]; then 281 | HSINFO() { 282 | #unblock wifi 283 | sudo rfkill unblock all >/dev/null 2>&1 284 | #bring wifi up 285 | sudo ifconfig wlan0 up 286 | #LIST=$(sudo iw dev "wlan0" scan ap-force | egrep "^BSS|SSID:" | grep SSID: | sed 's/SSID://' | awk '{ print $1 }') 287 | #LIST=$(echo $LIST | sed 's/ /|/g') 288 | LIST=$(sudo iw dev "wlan0" scan ap-force | sed -ne 's/^.*SSID: \(..*\)/\1/p' | sort | uniq | paste -sd '|') 289 | 290 | HSINFO=$(yad --center --form --width=400 --height=400 --separator="|" --item-separator="|" \ 291 | --image ${LOGO} --column=Check --column=App --column=Description \ 292 | --window-icon=${LOGO} --image-on-top --text-align=center \ 293 | --text="HotSpot Information\r\rPlease enter the information\rbelow \ 294 | for the Hot Spot\rNOTE: The last field is the password for the hotspot. You will use this password to \ 295 | connect to your Pi when it is in hotspot mode This password can only contain letters and numbers" \ 296 | --title="Build-a-Pi" \ 297 | --field="Home Wifi SSID":CB "$LIST" \ 298 | --field="Home Wifi Password":H \ 299 | --field="Hot Spot Password" \ 300 | --button="Exit":1 \ 301 | --button="Continue":2 \ 302 | --button="Refresh Wifi":3) 303 | BUT=$? 304 | if [ ${BUT} = 3 ]; then 305 | HSINFO #Call HSINFO function 306 | fi 307 | 308 | if [ ${BUT} = 252 ] || [ ${BUT} = 1 ]; then 309 | exit 310 | fi 311 | #} 312 | #HSINFO 313 | #fi 314 | SHACKSSID=$(echo $HSINFO | awk -F "|" '{print $1}') 315 | SHACKPASS=$(echo $HSINFO | awk -F "|" '{print $2}') 316 | HSPASS=$(echo $HSINFO | awk -F "|" '{print $3}') 317 | 318 | #Check password length 319 | if [ -n "$HS" ]; then 320 | COUNT=${#HSPASS} 321 | if [ ${COUNT} -lt 8 ]; then 322 | yad --center --form --width=300 --height=200 --separator="|" \ 323 | --image ${LOGO} --window-icon=${LOGO} --image-on-top --text-align=center \ 324 | --text="Hotspot password has to be 8-63 characters" --title="Build-a-Pi" \ 325 | --button=gtk-ok 326 | HSINFO 327 | fi 328 | fi 329 | 330 | } 331 | HSINFO 332 | fi 333 | 334 | echo "SHACKSSID=$SHACKSSID" >>${CONFIG} 335 | echo "SHACKPASS=\"$SHACKPASS\"" >>${CONFIG} 336 | echo "HSPASS=\"$HSPASS\"" >>${CONFIG} 337 | ################################### 338 | #CHECK IF GPS IS CHOSEN TO INSTALL# 339 | ################################### 340 | GPSINSTALL=$(cat ${BASE} | grep GPS) 341 | if [ -n "${GPSINSTALL}" ]; then 342 | 343 | yad --center --height="300" --width="300" --form --separator="|" --item-separator="|" --title="GPS" \ 344 | --image ${LOGO} --window-icon=${LOGO} --image-on-top \ 345 | --text="\r\r\r\r\rConnect your GPS to the pi" \ 346 | --button="Continue":2 347 | 348 | BUT=$? 349 | 350 | USB=$(ls /dev/serial/by-id) 351 | USB=$(echo "NONE $USB") #see https://github.com/km4ack/pi-build/issues/293 352 | USB=$(echo $USB | sed "s/\s/|/g") 353 | 354 | GPS=$(yad --center --height="600" --width="300" --form --separator="|" --item-separator="|" --title="GPS" \ 355 | --image ${LOGO} --window-icon=${LOGO} --image-on-top \ 356 | --text="Choose Your GPS" \ 357 | --field="GPS":CB "$USB") 358 | BUT=$? 359 | if [ ${BUT} = 252 ] || [ ${BUT} = 1 ]; then 360 | echo exiting 361 | exit 362 | fi 363 | 364 | GPS=$(echo ${GPS} | awk -F "|" '{print $1}') 365 | GPS=/dev/serial/by-id/${GPS} 366 | echo "GPS=${GPS}" >>${CONFIG} 367 | fi 368 | 369 | ##################################### 370 | # FLSUITE 371 | ##################################### 372 | yad --center --list --checklist --width=600 --height=600 --separator="" \ 373 | --image ${LOGO} --column=Check --column=App --column=Description \ 374 | --print-column=2 --window-icon=${LOGO} --image-on-top --text-align=center \ 375 | --text="FLDIGI Suite" --title="Build-a-Pi" \ 376 | false "FLRIG" "Rig Contol GUI" \ 377 | false "FLDIGI" "Digital Software" \ 378 | false "FLAMP" "File Transfer Program" \ 379 | false "FLNET" "Net Control Software" \ 380 | false "FLMSG" "Forms Manager" \ 381 | false "FLWRAP" "File Encapsulation" \ 382 | --button="Exit":1 \ 383 | --button="Check All and Continue":3 \ 384 | --button="Next":2 >${FLSUITE} 385 | BUT=$? 386 | if [ ${BUT} = 252 ] || [ ${BUT} = 1 ]; then 387 | exit 388 | fi 389 | if [ ${BUT} = 3 ]; then 390 | FLAPPS=(FLRIG FLDIGI FLAMP FLNET FLMSG FLWRAP) 391 | for i in "${FLAPPS[@]}"; do 392 | echo "$i" >>${FLSUITE} 393 | done 394 | fi 395 | 396 | ##################################### 397 | # Ham Apps 398 | ##################################### 399 | yad --center --list --checklist --width=600 --height=600 --separator="" \ 400 | --image ${LOGO} --column=Check --column=App --column=Description \ 401 | --print-column=2 --window-icon=${LOGO} --image-on-top --text-align=center \ 402 | --text="Ham Applications" --title="Build-a-Pi" \ 403 | false "CONKY" "System Information Display" \ 404 | false "PI-APRS" "APRS Message Application" \ 405 | false "CHIRP" "Program Radios" \ 406 | false "GARIM" "File Transfer Program" \ 407 | false "PAT" "Radio Email Application" \ 408 | false "PAT-MENU" "Control for Pat Winlink" \ 409 | false "JS8CALL" "Weak Signal Digital Mode Software" \ 410 | false "M0IAX" "Tools for JS8Call Messages" \ 411 | false "WSJTX" "Weak Signal Digital Mode Software" \ 412 | false "PYQSO" "Logging Software" \ 413 | false "HAMRS" "Logging Software" \ 414 | false "CQRLOG" "Logging Software" \ 415 | false "EES" "KM4ACK Emergency Email Server" \ 416 | false "QSSTV" "Slow Scan TV" \ 417 | false "GRIDTRACKER" "Track Grids in WSJTX" \ 418 | false "HAMCLOCK" "Clock for Ham Radio Ops" \ 419 | false "PROPAGATION" "Propagation Prediction Software" \ 420 | false "YAAC" "Yet Another APRS Client" \ 421 | false "XASTIR" "APRS Client" \ 422 | false "GPREDICT" "Satellite Tracking" \ 423 | false "TQSL" "LOTW Software" \ 424 | false "GRIDCALC" "Grid Calculation Software" \ 425 | false "REPEAT" "Repeater Directory" \ 426 | --button="Exit":1 \ 427 | --button="Check All and Continue":3 \ 428 | --button="Next":2 >${ADDITIONAL} 429 | BUT=$? 430 | if [ ${BUT} = 252 ] || [ ${BUT} = 1 ]; then 431 | exit 432 | fi 433 | 434 | if [ ${BUT} = 3 ]; then 435 | ADDAPPS=(CONKY PI-APRS CHIRP GARIM VARIM PAT PAT-MENU JS8CALL M0IAX WSJTX PYQSO 436 | HAMRS EES QSSTV GRIDTRACKER HAMCLOCK PROPAGATION YAAC XASTIR GPREDICT TQSL 437 | GRIDCALC CQRLOG REPEAT) 438 | 439 | for i in "${ADDAPPS[@]}"; do 440 | echo "$i" >>${ADDITIONAL} 441 | done 442 | fi 443 | 444 | #check if hamclock is being installed 445 | HCCHECK=$(grep "HAMCLOCK" ${ADDITIONAL}) 446 | if [ -n "$HCCHECK" ]; then 447 | 448 | HC=$(yad --form --width=420 --text-align=center --center --title="Build-a-Pi" \ 449 | --image ${LOGO} --window-icon=${LOGO} --image-on-top --separator="|" --item-separator="|" \ 450 | --text="version $VERSION" \ 451 | --field="Ham Clock Size":CB "SMALL|LARGE" \ 452 | --button="Continue":2) 453 | HC=$(echo $HC | awk -F "|" '{print $1}') 454 | sed -i 's/HAMCLOCK//' ${ADDITIONAL} 455 | echo $HC >>${ADDITIONAL} 456 | fi 457 | 458 | 459 | PATCHECK=$(grep "PAT" ${ADDITIONAL}) 460 | if [ -n "$PATCHECK" ]; then 461 | INFO=$(yad --form --width=420 --text-align=center --center --title="Build-a-Pi" \ 462 | --image ${LOGO} --window-icon=${LOGO} --image-on-top --separator="|" --item-separator="|" \ 463 | --text="version $VERSION" \ 464 | --field="Six Character Grid Square" \ 465 | --field="Winlink Password":H \ 466 | --field="Password is case sensitive":LBL \ 467 | --button="Continue":2) 468 | GRID=$(echo ${INFO} | awk -F "|" '{print $1}') 469 | GRID=${GRID^^} 470 | WL2KPASS=$(echo ${INFO} | awk -F "|" '{print $2}') 471 | echo "GRID=$GRID" >>${CONFIG} 472 | echo "WL2KPASS=\"$WL2KPASS\"" >>${CONFIG} 473 | fi 474 | 475 | ##################################### 476 | # Utilities 477 | ##################################### 478 | yad --center --list --checklist --width=600 --height=600 --separator="" \ 479 | --image ${LOGO} --column=Check --column=App --column=Description \ 480 | --print-column=2 --window-icon=${LOGO} --image-on-top --text-align=center \ 481 | --text="Utilities" --title="Build-a-Pi" \ 482 | false "DIPOLE" "Dipole Calculator" \ 483 | false "PACKETSEARCH" "Winlink Packet Tool" \ 484 | false "CALLSIGN" "Call sign lookup" \ 485 | false "TEMPCONVERT" "Temperature Converter" \ 486 | false "HDOCS" "Reference Materials PDFs" \ 487 | false "GPARTED" "Disk Utility Tool" \ 488 | false "SHOWLOG" "Log file viewer" \ 489 | false "PISTATS" "Pi3/4 Stats Monitor" \ 490 | false "TELNET" "Telnet Protocol" \ 491 | false "PITERM" "piQtTermTCP Terminal Program" \ 492 | false "QTSOUND" "piQtSoundModem" \ 493 | false "SECURITY" "File Encryption Software" \ 494 | false "YGATE" "Yaesu APRS Software" \ 495 | false "BPQ" "LinBPQ Software" \ 496 | false "BATT" "Battery Test Script" \ 497 | false "VNC" "VNC Client Application" \ 498 | false "XYGRIB" "Grib File Viewer" \ 499 | --button="Exit":1 \ 500 | --button="Check All and Continue":3 \ 501 | --button="Install Selected":2 >${UTILITY} 502 | BUT=$? 503 | if [ ${BUT} = 252 ] || [ ${BUT} = 1 ]; then 504 | exit 505 | fi 506 | 507 | if [ ${BUT} = 3 ]; then 508 | UTILAPPS=(DIPOLE PACKETSEARCH CALLSIGN TEMPCONVERT HDOCS GPARTED SHOWLOG PISTATS TELNET PITERM QTSOUND SECURITY YGATE BPQ BATT VNC XYGRIB) 509 | for i in "${UTILAPPS[@]}"; do 510 | echo "$i" >>${UTILITY} 511 | done 512 | fi 513 | 514 | #backup crontab 515 | crontab -l >$TEMPCRON 516 | echo "@reboot sleep 10 && export DISPLAY=:0 && ${MYPATH}/.complete" >>$TEMPCRON 517 | ${MYPATH}/.funfacts & 518 | #upgrade the system 519 | sudo apt-get -y upgrade 520 | sudo apt -y full-upgrade 521 | 522 | #fix issue 254 05JULY2021 523 | sudo sed -i 's/#hdmi_force_hotplug=1/hdmi_force_hotplug=1/' config.txt 524 | 525 | #set wallpaper 526 | #fix issue 193 527 | sudo cp $HOME/pi-build/bap-wallpaper.jpg /usr/share/rpd-wallpaper/ 528 | pcmanfm --set-wallpaper /usr/share/rpd-wallpaper/bap-wallpaper.jpg 529 | 530 | mkdir -p ${DIR} 2>/dev/null 531 | 532 | #add virtual sound card link for pulse audio 533 | cd ${DIR} || ! echo "Failure" 534 | cat >tempsound <tempsound <>${HOME}/.bashrc 564 | 565 | #set update script to exec 566 | chmod +x ${MYPATH}/update ${MYPATH}/build-a-pi 567 | 568 | #create build-a-pi menu item 569 | cd ${MYPATH} || ! echo "Failure" 570 | cat >build-a-pi.desktop < /run/user/$UID/repair-bap 586 | #!/bin/bash 587 | 588 | if [ ! -f $HOME/pi-build/update ]; then 589 | echo "################################" 590 | echo "# BAP update tool not found. #" 591 | echo "# Repairing, please stand by #" 592 | echo "################################" 593 | cd $HOME 594 | git clone https://github.com/km4ack/pi-build.git || echo "Could not connect to Github. Check your internet and try again" 595 | echo "Repair complete. Run the Build a Pi update tool using the shortcut in the Pi menu" 596 | else 597 | clear;echo;echo 598 | echo "Update tool is present on the system." 599 | fi 600 | EOF 601 | chmod +x /run/user/$UID/repair-bap 602 | sudo mv /run/user/$UID/repair-bap /usr/local/bin/ 603 | 604 | ##################################### 605 | # Install Base Apps 606 | ##################################### 607 | touch ${RB} 608 | echo "INITIAL=\"build date $DATE version $VERSION\"" >> ${RB} 609 | source ${FUNCTIONS}/base.function 610 | while read i; do 611 | $i 612 | done <${BASE} 613 | 614 | ##################################### 615 | # Install FLSUITE 616 | ##################################### 617 | source ${FUNCTIONS}/flsuite.function 618 | #perform memory increase if needed 619 | CHECKFL="${MYPATH}/flsuite.txt" 620 | if [ -s "$CHECKFL" ]; then 621 | FLSTART 622 | fi 623 | touch ${RB} 624 | while read i; do 625 | $i 626 | done <${FLSUITE} 627 | 628 | #Perform memory reset if needed 629 | if [ -s "$CHECKFL" ]; then 630 | FLSTOP 631 | fi 632 | 633 | ##################################### 634 | # Install ADDITIONAL Apps 635 | ##################################### 636 | source ${FUNCTIONS}/additional.function 637 | while read i; do 638 | $i 639 | done <${ADDITIONAL} 640 | 641 | ##################################### 642 | # Install KM4ACK Utilites 643 | ##################################### 644 | source ${FUNCTIONS}/utility.function 645 | while read i; do 646 | $i 647 | done <${UTILITY} 648 | 649 | #create new menu subcategories. One for FLDIGI Suite and 650 | #one for Build a Pi. 651 | bash ${HOME}/pi-build/menu-update 652 | 653 | ##################################### 654 | # END CLEANUP 655 | ##################################### 656 | #Remove temp files 657 | rm ${BASE} ${ADDITIONAL} ${UTILITY} ${FLSUITE} >/dev/null 2>&1 658 | rm -rf ${DIR} >/dev/null 2>&1 659 | sudo apt -y autoremove > /dev/null 2>&1 660 | 661 | #remove libham (rigctl) installed from apt 662 | #since it conflicts with hamlib installed from source 663 | sudo apt purge -y libhamlib4 664 | 665 | #restore crontab 666 | crontab ${TEMPCRON} 667 | rm ${TEMPCRON} 668 | 669 | echo "WE ARE ALL DONE HERE. If you close this window, you will have to reboot manually." 670 | 671 | #reboot when done 672 | yad --width=400 --height=200 --title="Reboot" --image ${LOGO} \ 673 | --text-align=center --skip-taskbar --image-on-top \ 674 | --wrap --window-icon=${LOGO} \ 675 | --undecorated --text="Build Finished \rReboot Required\r\r" \ 676 | --button="Reboot Now":0 \ 677 | --button="Exit":1 678 | BUT=$(echo $?) 679 | 680 | if [ ${BUT} = 0 ]; then 681 | echo rebooting 682 | sudo reboot 683 | elif [ ${BUT} = 1 ]; then 684 | exit 685 | fi 686 | -------------------------------------------------------------------------------- /changelog: -------------------------------------------------------------------------------- 1 | version=3.3.2 2 | 3 | 3.3.2 Fix WSJTX not installing - Thanks Michael Shriver! 4 | Fix Chirp not installing 5 | Chirp update check changed. See notes in app-check script. 6 | Fix VARA check where Pi user was hard coded 7 | Fix https://github.com/km4ack/pi-build/issues/477 8 | 3.3.1 Fix Chirp not installing on 64bit OS - https://github.com/km4ack/pi-build/pull/452 9 | Fix Chirp version check 10 | Fix QSSTV Install - https://github.com/km4ack/pi-build/issues/422 11 | Fix Repeat Start App Check - https://github.com/km4ack/pi-build/issues/450 12 | Add VARIM - https://github.com/km4ack/pi-build/pull/458 13 | Add reference docs - https://github.com/km4ack/pi-build/pull/446 14 | Cleanup app-check script 15 | Fix VARA showing "not installed" when it was installed 16 | Hide Passwords while typing. - Thanks Nullvibes! 17 | Fix FLRIG not in flsuite sub category - Thanks lcgreenwald! 18 | 3.3.0 Add VARA modem - https://github.com/km4ack/pi-build/issues/394 19 | fix conky 7 inch config - https://github.com/km4ack/pi-build/issues/414 20 | fix old ardop modem not removed - https://github.com/km4ack/pi-build/issues/413 21 | create VARA sub category - https://github.com/km4ack/pi-build/issues/393 22 | update chirp install - https://github.com/km4ack/pi-build/issues/337 23 | use 64bit package to install pat on 64bit OS - https://github.com/km4ack/pi-build/issues/424 24 | Add RepeaterStart - https://github.com/km4ack/pi-build/issues/400 25 | fix gridtracker download - https://github.com/km4ack/pi-build/issues/447 26 | 3.2.4 Update HotSpot Tools shortcut 27 | Change 1000 to UID in update script 28 | Remove Pi username check 29 | add ability to work with custom user names 30 | fix shortcut for Pi-APRS 31 | fix issue #391 https://github.com/km4ack/pi-build/issues/391 32 | fix issue #390 https://github.com/km4ack/pi-build/issues/390 33 | fix issue #380 https://github.com/km4ack/pi-build/issues/380 34 | fix issue #401 Gridtracker not downloading https://github.com/km4ack/pi-build/issues/401 35 | fix hamrs not installing/updating - https://github.com/km4ack/pi-build/issues/404 36 | fix issue #408 https://github.com/km4ack/pi-build/issues/408 37 | 38 | 3.2.3 Add support for Pat Winlink in 64 bit OS 39 | Fix FLDIGI on 64 bit - https://github.com/km4ack/pi-build/issues/378 40 | Add support for gridtracker 64 bit - https://github.com/km4ack/pi-build/issues/382 41 | Fix broken VNC viewer package for 64 bit 42 | Fix HAMRS not starting 32 bit - https://github.com/km4ack/pi-build/issues/379 43 | Fix HAMRS not starting 64 bit - Thanks W9RNR 44 | Fix PiQtSoundModem for 64 bit install - Thanks Ben,KU0HN 45 | Fix PiQtTermTCP for 64 bit install - Thanks Ben,KU0HN 46 | Fix broken link for VNC viewer download 47 | Fix piardopc dependencies for 64 bit install 48 | 49 | 3.2.2 Add cqrlog built from source - https://github.com/km4ack/pi-build/issues/349 50 | Fix HAMRS install (Thanks WF5W)- https://github.com/km4ack/pi-build/issues/345 51 | Fix Pat Menu Update status - https://github.com/km4ack/pi-build/issues/371 52 | Fix RTC install - https://github.com/km4ack/pi-build/issues/358 53 | Fix Chirp update status - https://github.com/km4ack/pi-build/issues/373 54 | Fix NMEA statement in chrony.conf (Thanks DC2JR) - https://github.com/km4ack/pi-build/issues/374 55 | Add gps library to support direwolf (libgps-dev) 56 | Fix YAAC reopening after close - https://github.com/km4ack/pi-build/issues/375 57 | 58 | 3.2.1 Fix wsjtx install - https://github.com/km4ack/pi-build/issues/365 59 | Fix gridtracker install - https://github.com/km4ack/pi-build/issues/362 60 | Fix PiQtTermTCP install - https://github.com/km4ack/pi-build/issues/360 61 | Add root check - https://github.com/km4ack/pi-build/issues/366 62 | Fix YAAC update indication - https://github.com/km4ack/pi-build/issues/363 63 | Create symlink lxterminal/xterm - https://github.com/km4ack/pi-build/issues/34 64 | Add build a pi repair tool 65 | 66 | 3.2.0 fix hamlib - https://github.com/km4ack/pi-build/issues/338 67 | fix YAAC install - https://github.com/km4ack/pi-build/issues/339 68 | fix variable - https://github.com/km4ack/pi-build/issues/340 69 | fix QSSTV install - https://github.com/km4ack/pi-build/issues/346 70 | fix TQSL install - https://github.com/km4ack/pi-build/issues/347 71 | fix xgps error - https://github.com/km4ack/pi-build/issues/342 72 | fix sound card number issue - https://github.com/km4ack/pi-build/issues/348 73 | fix conky temperature display error - https://github.com/km4ack/pi-build/issues/334 74 | fix qsstv icon - https://github.com/km4ack/pi-build/issues/333 75 | build JS8Call from source - https://github.com/km4ack/pi-build/issues/341 76 | build wsjtx from source 77 | revert chirp to apt install until it can be built from source on Bullseye - https://github.com/km4ack/pi-build/issues/337 78 | replace zybrig with xygrib 79 | remove cqrlog - installing from apt breaks hamlib 80 | update qtsoundmodem depends 81 | install gpsd with apt - https://github.com/km4ack/pi-build/issues/321 82 | update ruby to 2.7 83 | update EES to PHP7.4 84 | fix EES sed statment (0.0.0.0:8080 to :5000) 85 | increase swap file for JS8Call/WSJTX on Pi's with less RAM - https://github.com/km4ack/pi-build/issues/350 86 | NOTE: This version will NOT support Buster 87 | 88 | 3.1.4 last update for Build a Pi to support Buster 89 | 90 | 3.1.3 Split app check from update script into new app-check script 91 | fix variable in menu-update script 92 | update flsuite with new build directory 93 | update base apps with new build directory 94 | update utility apps with new build directory 95 | update ham app with new build directory 96 | change pat config file location for Pat version 0.12 97 | add pat 12 check to update script - https://github.com/km4ack/pi-build/issues/328 98 | fix mistake in jq command with new pat path 99 | 100 | 3.1.2 Fix FLSUITE links 101 | 102 | 3.1.1 Remove echo statement from patch menu script. 103 | Add libusb-1.0 and libusb-dev to hamlib build section https://github.com/km4ack/pi-build/issues/296 104 | fix FLAMP install - https://github.com/km4ack/pi-build/issues/301 105 | fix BAP menu - https://github.com/km4ack/pi-build/issues/302 106 | fix pat secutiry issue - https://github.com/km4ack/pi-build/issues/299 107 | add build/update logging - https://github.com/km4ack/pi-build/issues/294 108 | add "none" to GPS selection - https://github.com/km4ack/pi-build/issues/293 109 | fix spelling of i2c - https://github.com/km4ack/pi-build/issues/289 110 | fix linbpq help file - https://github.com/km4ack/pi-build/issues/287 111 | fix python-suds error - https://github.com/km4ack/pi-build/issues/272 112 | fix conky awk error - https://github.com/km4ack/pi-build/issues/306 113 | fix gridtracker link - https://github.com/km4ack/pi-build/issues/314 114 | fix gridtracker install error - https://github.com/km4ack/pi-build/issues/286 115 | fix hamrs install bug - https://github.com/km4ack/pi-build/issues/288 116 | fix gpsd issue - https://github.com/km4ack/pi-build/issues/316 117 | resolve issue 199 - https://github.com/km4ack/pi-build/issues/199 118 | remove exit option for GPS - https://github.com/km4ack/pi-build/issues/318 119 | fix multiple chrony.conf entries - https://github.com/km4ack/pi-build/issues/317 120 | fix FLDIGI download link 121 | 122 | 123 | 3.1.0 add Build a Pi Patch Tool 124 | 125 | 3.0.8 126 | add support to direwolf for CM108/CM119 - https://github.com/km4ack/pi-build/issues/243 127 | fix zygrib update error - https://github.com/km4ack/pi-build/issues/235 128 | mark libjpg9 as manual install - https://github.com/km4ack/pi-build/issues/233 129 | add autoremove back to BAP primary script - https://github.com/km4ack/pi-build/issues/233 130 | fix wallpaper path - https://github.com/km4ack/pi-build/issues/230 131 | update hamclock to new style build 132 | fix temp not changing to C in setconky (conky-prefs) - https://github.com/km4ack/pi-build/issues/218 133 | add gridcalc software - https://github.com/km4ack/pi-build/issues/214 134 | fix xastir update check 135 | fix fldigi not installing https://github.com/km4ack/pi-build/issues/263 136 | fix gridtracker not installing/updating https://github.com/km4ack/pi-build/issues/253 137 | fix display issue https://github.com/km4ack/pi-build/issues/254 138 | add HAMRS.app logging software - https://github.com/km4ack/pi-build/issues/264 139 | add packet search - Winlink Packet Tool 140 | add piQtSoundModem - https://github.com/km4ack/pi-build/issues/256 141 | add new menu sub categories 142 | fix garbled conky display (#213) Thanks Terry K4HNT! 143 | fix VNC viewer download 144 | update PiStats url to new location 145 | remove support for xlog - https://github.com/km4ack/pi-build/issues/215 146 | fix qsstv install - https://github.com/km4ack/pi-build/issues/225 147 | fix error in conky-prefs script 148 | fix qsstv menu item 149 | 150 | 151 | 3.0.7 patch to fix flrig from not installing correctly https://github.com/km4ack/pi-build/issues/229 152 | 153 | 3.0.6 Remove Pulse audio install https://github.com/km4ack/pi-build/issues/186 154 | Add Support for SSID with spaces Merge https://github.com/km4ack/pi-build/pull/184 155 | Fix BPQ desktop note to correctly indicate where config generator is located 156 | Fix wifi names with spaces issue (Thanks Kuperman!) https://github.com/km4ack/pi-build/pull/182 157 | Build CQRLOG from source https://github.com/km4ack/pi-build/issues/102 (Thanks Rico!) 158 | Moved BAP wallpaper to /usr/share/rpd-wallpaper https://github.com/km4ack/pi-build/issues/193 159 | Add zygrib https://github.com/km4ack/pi-build/issues/190 160 | Build xastir from source 161 | update xastir version check in update script 162 | fix wsjtx 2.3.0 install issue https://github.com/km4ack/pi-build/issues/209 163 | add new GPS update tool 164 | update conky for better GPS support 165 | change hamlib download to dynamic / upgrade to 4.0 166 | fix YAAC not updating 167 | fix issue #181 https://github.com/km4ack/pi-build/issues/181 168 | fix GPS update tool install to avoid duplicate downloads 169 | fix sstv install 170 | 171 | 3.0.5 Fix RTC https://github.com/km4ack/pi-build/issues/139 172 | Add Telnet https://github.com/km4ack/pi-build/issues/129 173 | Fix GPS conflict https://github.com/km4ack/pi-build/issues/146 174 | Add Security Tool File Encryption https://github.com/km4ack/pi-build/issues/148 175 | Add PTT command to direwolf.conf (commented out by default) 176 | Fix curl "body write fail" in update script 177 | Fix https://github.com/km4ack/pi-build/issues/152 178 | Fix https://github.com/km4ack/pi-build/issues/155 179 | Add YGATE - https://github.com/craigerl/ygate/blob/master/ygate.py 180 | Add XGPS menu item - https://github.com/km4ack/pi-build/issues/156 181 | update README.md 182 | add LinBPQ 183 | fix https://github.com/km4ack/pi-build/issues/105 (Conky display issue) 184 | add Battery Test Script 185 | add piQtTermTCP 186 | Remove JTDX (Website Down) see - https://github.com/km4ack/pi-build/issues/153 187 | add VNC viewer 188 | fix direwolf build procedure https://github.com/km4ack/pi-build/issues/163 189 | 190 | 3.0.4 Add gitignore 191 | Fix Issue #109 https://github.com/km4ack/pi-build/issues/109 192 | add setconky to main menu in pref sub catagory 193 | fix issue #119 https://github.com/km4ack/pi-build/issues/119 194 | add TQSL - resolve https://github.com/km4ack/pi-build/issues/93 195 | add PISTATS - https://github.com/km4ack/pi-build/issues/9 196 | add JTDX https://github.com/km4ack/pi-build/issues/15 197 | add xlog https://github.com/km4ack/pi-build/issues/45 198 | fix issue 101 https://github.com/km4ack/pi-build/issues/101 199 | update ruby install to 2.5 200 | update M0IAX JS8Call Utils install method 201 | improve GPS selection section to handle GPS not plugged in at boot 202 | add bc install to build a pi script 203 | add bc install to update script 204 | update pat winlink check 205 | update pat winlink install 206 | backup/restore pat config file if it exist 207 | fix grid tracker download (Thanks KN4QLH for finding the bug!) 208 | fix pat install (Thanks KD7UM for finding the bug!) 209 | 210 | 3.0.3 Add GPS by-id to allow for different GPS units to be used (Thanks pleasantone for suggestion) https://github.com/km4ack/pi-build/issues/40 211 | Change conky auto start. Fix https://github.com/km4ack/pi-build/issues/83 212 | Add gpredict satellite tracking software 213 | Add version number to update splash screen (Thanks N5RKE) 214 | send auto remove to dev/null 215 | resolve https://github.com/km4ack/pi-build/issues/92 in wsjtx section (hardcoded for 2.2.2) 216 | add conky-logo.png 217 | add conky logo to setconky 218 | fix issue 108 https://github.com/km4ack/pi-build/issues/108 Thanks N5RKS! 219 | add kernal version only line to diagnostic script 220 | add 7inch conky setting (Thanks VK4GRA) 221 | 222 | 3.0.2 Add BAP update check to update script 223 | 224 | 3.0.1 Fix FLMSG download 225 | Fix FLRIG to download latest version 226 | Add WPA data to diagnostic report 227 | Change Conky Date format https://github.com/km4ack/pi-build/issues/79 228 | 229 | 3.0.0 Clean up leftover notes in code 230 | Add README.md 231 | 232 | 3.0.0rc6 add RTC to update script 233 | add Showlog log file viewer 234 | add autoremove to main script 235 | add autoremove to update script 236 | fix FLWRAP not installing (Thanks KD7UM for finding the bug) 237 | add menu icon for dipole calculator 238 | add icon for callsign lookup 239 | 240 | 3.0.0rc5 241 | allow special characters in HotSpot password (Thanks Andew Buskov for suggestion) 242 | fix FLMSG download 243 | add timeout to all wget command 2 tries for 60 seconds each 244 | change reboot to optional at end of update script 245 | touch mylogo.txt during conky install to keep conky from failing to start 246 | add snd-usb-audio index=2 to /etc/modprobe.d/alsa.conf to assign USB sound to card 2 (Thanks Daftcho Tabakov) ***FIX FOR BUSTER CARD NUMBERING*** 247 | change sound card to 2,0 in direwolf.conf during direwolf install (base.functions) 248 | change sound card to 2,0 in pat menu config file during install (additional.functions) 249 | 250 | 3.0.0rc4 251 | fix variables in utilities array. This mistake was causing install issues. 252 | Create finish trap in BAP 253 | Update finish trap in update script 254 | change reboot to be optional 255 | 256 | 3.0.0rc3 Fix typo date --> data in ax25 section 257 | Set user call in pat menu if installed 258 | Fix Winlink password to accommadate special character "$" (Thanks KJ7DMV for finding the bug) 259 | Add FLWRAP application 260 | Add HamClock application 261 | correct pat info so it only shows when needed in BAP script 262 | fix wsjtx certificate error 263 | add verify user is pi to main script 264 | fix for SSIDs that contain spaces. (Thanks to KK4IKK for the fix) 265 | fix hotspot tools not updating 266 | fix patmenu not updating 267 | 268 | 3.0.0rc2 move pat login to new screen 269 | add check all and continue button 270 | Rename buttons for clarification 271 | Add refresh wifi to hotspot info screen 272 | change wording for HS info and resize screen 273 | 274 | 3.0.0rc1 Major rewrite of script with new GUI interface 275 | add ability to run script multiple times to install additional apps and update existing apps 276 | eliminate update-bap 277 | add official version number 278 | add pi-aprs 279 | add dipole calculator 280 | add call lookup 281 | add gparted 282 | --------------------------------------------------------------------------------------------------------------------------------------------- 283 | 20200319 Add gridtracker to update script 284 | 20200316 Add bap-update script (beta) 285 | 20200229 add beta version of hotspot tools ------------------need to change to master checkout at some point in the future 286 | update EES install to include new way of modding index.html with ghost writer-----------------EES is checking out DEV version 287 | add ghost writer install to EES section 288 | 20200228 Version 2 release on YouTube 289 | 20200220 include add-wifi script 290 | update M0IAX tools to latest version 291 | remove old MOIAX tools 292 | change date format in conky 293 | add real time clock install to app choices 294 | update pat winlink to latest version 0.9.0 295 | 20200214 add conky resize script 296 | 20200122 Add option to build FLDIGI suite from source 297 | split app selection to two boxes 298 | backup cron just in case script is run twice 299 | begin logging the build ~/Downloads/build-log.txt 300 | add PYQSO from repository 301 | add GPREDICT from repository 302 | add CQRLOG from repository 303 | add QSSTV from source 304 | 20200117 Initial Release on Youtube -------------------------------------------------------------------------------- /conky/.conkyrc: -------------------------------------------------------------------------------- 1 | conky.config = { 2 | background = true, 3 | use_xft = true, 4 | font = '123:size=8', 5 | xftalpha = 0.5, 6 | update_interval = 0.5, 7 | total_run_times = 0, 8 | own_window = true, 9 | own_window_type = 'normal', 10 | own_window_transparent = true, 11 | own_window_hints = 'undecorated,below,sticky,skip_taskbar,skip_pager', 12 | double_buffer = true, 13 | minimum_width = 250, minimum_height = 5, 14 | maximum_width = 400, 15 | draw_shades = false, 16 | draw_outline = false, 17 | draw_borders = false, 18 | draw_graph_borders = false, 19 | default_color = 'gray', 20 | default_shade_color = 'red', 21 | default_outline_color = 'green', 22 | alignment = 'top_right', 23 | gap_x = 10, 24 | gap_y = 10, 25 | no_buffers = true, 26 | uppercase = false, 27 | cpu_avg_samples = 2, 28 | net_avg_samples = 1, 29 | override_utf8_locale = false, 30 | use_spacer = 'right', 31 | }; 32 | 33 | conky.text = [[ 34 | 35 | ${voffset 15} 36 | ${font Arial:size=30}${color Yellow}${alignc}N0CALL 37 | ${voffset -45} 38 | ${font Arial:bold:size=18}${color White}Gridsquare ${alignr}${color Yellow}${execi 60 cat /run/user/1000/gridinfo.txt | cut -c1-8} 39 | #${font Arial:bold:size=18}${color White}Radio Freq ${alignr}${color Yellow}${execi 5 $HOME/bin/conky/get-freq | cut -c1-6} 40 | #${font Arial:bold:size=18}${color White}Radio Freq A ${if_match "VFOA" == "${execi 5 $HOME/bin/conky/get-vfo}"}*$endif\ 41 | #${alignr}${color Yellow}${execi 5 $HOME/bin/conky/get-freq VFOA | cut -c1-7} 42 | #${font Arial:bold:size=18}${color White}Radio Freq B ${if_match "VFOB" == "${execi 5 $HOME/bin/conky/get-vfo}"}*$endif\ 43 | #${alignr}${color Yellow}${execi 5 $HOME/bin/conky/get-freq VFOB | cut -c1-7} 44 | 45 | ${color Yellow}LOCAL${alignr}ZULU 46 | ${voffset -45} 47 | ${color DarkSlateGray}${hr 2} 48 | ${voffset -35} 49 | ${font Arial:bold:size=25}${color White}${time %H:%M:%S}\ 50 | ${alignr}${tztime Zulu %H:%M:%S} 51 | ${font Arial:bold:size=25}${color White}${time %d%b%y}\ 52 | ${alignr}${tztime Zulu %d%b%y} 53 | 54 | 55 | ${voffset -245} 56 | 57 | 58 | ${color grey} 59 | ${font} 60 | ${font Arial:bold:size=14}${color Yellow}SYSTEM ${color DarkSlateGray} ${hr 2} 61 | ${font Arial:bold:size=14}${color White}Frequency $alignr${freq_g cpu0}Ghz 62 | ${font Arial:bold:size=14}${color White}Uptime $alignr${uptime} 63 | ${font Arial:bold:size=14}${color White}Temp: $alignr ${exec /usr/bin/vcgencmd measure_temp | cut -c6-9} C 64 | ${voffset -15} 65 | ${font Arial:bold:size=10}${color White}CPU${alignr}${cpu}% 66 | ${cpubar cpu} 67 | ${font Arial:bold:size=10}${color White}MEM $alignc $mem / $memmax $alignr $memperc% 68 | $membar 69 | ${font Arial:bold:size=10}${color White}SWAP $alignc $swap / $swapmax $alignr $swapperc% 70 | $swapbar 71 | ${font Arial:bold:size=10}${color White}HDD $alignc ${fs_used /home} / ${fs_size /home} $alignr ${fs_free_perc /home}% 72 | ${fs_bar /home} 73 | 74 | ${font Arial:bold:size=14}${color Yellow}NETWORK/HOTSPOT ${color DarkSlateGray}${hr 2} 75 | ${font Arial:bold:size=14}${color White}Wireless IP address $alignr ${addr wlan0} 76 | ${font Arial:bold:size=14}${color White}Wired IP address $alignr ${addr eth0} 77 | ${font Arial:bold:size=14}${color Yellow}DHCP ADDRESSES FOR HOTSPOT ${color DarkSlateGray}${hr 2} 78 | ${font Arial:bold:size=12}${color White}${execi 5 cat /var/lib/misc/dnsmasq.leases | awk '{ print $3" "$4 }'} 79 | 80 | ${font Arial:bold:size=14}${color Yellow}RADIO TOOLS ${color DarkSlateGray}${hr 2} 81 | ${font Arial:size=12}${if_running piardopc}${color green}ARDOP ACTIVE${else}${color red}ARDOP OFF$endif \ 82 | ${alignr}${if_running rigctld}${color green}RIGCTL ACTIVE${else}${color red}RIGCTL OFF$endif 83 | ${if_running kissattach}${color green}KISSATCH ACTIVE${else}${color red}KISSATCH OFF$endif \ 84 | ${alignr}${if_running direwolf}${color green}DIREWOLF ACTIVE${else}${color red}DIREWOLF OFF$endif 85 | 86 | ${font Arial:bold:size=14}${color Yellow}DIGITAL APPS ${color DarkSlateGray}${hr 2} 87 | ${font Arial:size=12}${if_running js8call}${color green}JS8 ACTIVE${else}${color red}JS8 OFF$endif \ 88 | ${alignr}${if_running flrig}${color green}FLRIG ACTIVE${else}${color red}FLRIG OFF$endif 89 | ${if_running garim}${color green}GARIM ACTIVE${else}${color red}GARIM OFF$endif \ 90 | ${alignr}${if_running fldigi}${color green}FLDIGI ACTIVE${else}${color red}FLDIGI OFF$endif 91 | ${if_running pavucontrol}${color green}PULSE ACTIVE${else}${color red}PULSE OFF$endif \ 92 | ${alignr}${if_running pat}${color green}PAT ACTIVE${else}${color red}PAT OFF$endif 93 | 94 | ${font Arial:bold:size=14}${color Yellow}RECENT LOG ENTRIES ${color DarkSlateGray}${hr 2} 95 | ${font Arial:bold:size=10}${color White}${tail ~/Documents/mylog.txt 5} 96 | 97 | 98 | 99 | #$diskio 100 | ]]; 101 | -------------------------------------------------------------------------------- /conky/conky-7inch: -------------------------------------------------------------------------------- 1 | conky.config = { 2 | background = true, 3 | use_xft = true, 4 | font = '123:size=8', 5 | xftalpha = 0.5, 6 | update_interval = 0.5, 7 | total_run_times = 0, 8 | own_window = true, 9 | own_window_type = 'normal', 10 | own_window_transparent = true, 11 | own_window_hints = 'undecorated,below,sticky,skip_taskbar,skip_pager', 12 | double_buffer = true, 13 | minimum_width = 250, minimum_height = 5, 14 | maximum_width = 400, 15 | draw_shades = false, 16 | draw_outline = false, 17 | draw_borders = false, 18 | draw_graph_borders = false, 19 | default_color = 'gray', 20 | default_shade_color = 'red', 21 | default_outline_color = 'green', 22 | alignment = 'top_right', 23 | gap_x = 10, 24 | gap_y = 10, 25 | no_buffers = true, 26 | uppercase = false, 27 | cpu_avg_samples = 2, 28 | net_avg_samples = 1, 29 | override_utf8_locale = true, 30 | use_spacer = 'right', 31 | }; 32 | 33 | conky.text = [[ 34 | 35 | ${font Arial:size=12}${color Yellow}${alignc}N0CALL 36 | ${voffset -30} 37 | ${font Arial:bold:size=08}${color White}Gridsquare ${alignr}${color Yellow}${execi 60 cat /run/user/1000/gridinfo.txt | cut -c1-8} 38 | #${font Arial:bold:size=12}${color White}Radio Freq ${alignr}${color Yellow}${execi 5 $HOME/bin/conky/get-freq | cut -c1-6} 39 | ${color Yellow}LOCAL${alignr}ZULU 40 | ${voffset -20} 41 | ${color DarkSlateGray}${hr 2} 42 | ${font Arial:bold:size=08}${color White}${time %H:%M:%S}\ 43 | ${alignr}${tztime Zulu %H:%M:%S} 44 | ${font Arial:bold:size=08}${color White}${time %d%b%y}\ 45 | ${alignr}${tztime Zulu %d%b%y} 46 | 47 | 48 | ${voffset -85} 49 | 50 | 51 | ${color grey} 52 | ${font} 53 | ${font Arial:bold:size=08}${color Yellow}SYSTEM ${color DarkSlateGray} ${hr 2} 54 | ${font Arial:bold:size=08}${color White}Frequency $alignr${freq_g cpu0}Ghz 55 | ${font Arial:bold:size=08}${color White}Uptime $alignr${uptime} 56 | #TEMP 57 | ${font Arial:bold:size=08}${color White}Temp: $alignr ${exec /usr/bin/vcgencmd measure_temp | cut -c6-9} C 58 | ${voffset -10} 59 | ${font Arial:bold:size=6}${color White}CPU${alignr}${cpu}% 60 | ${cpubar cpu} 61 | ${font Arial:bold:size=6}${color White}MEM $alignc $mem / $memmax $alignr $memperc% 62 | $membar 63 | ${font Arial:bold:size=6}${color White}SWAP $alignc $swap / $swapmax $alignr $swapperc% 64 | $swapbar 65 | ${font Arial:bold:size=6}${color White}HDD $alignc ${fs_used /home} / ${fs_size /home} $alignr ${fs_free_perc /home}% 66 | ${fs_bar /home} 67 | # 68 | ${font Arial:bold:size=8}${color Yellow}NETWORK/HOTSPOT ${color DarkSlateGray}${hr 2} 69 | ${font Arial:bold:size=8}${color White}Wireless IP address $alignr ${addr wlan0} 70 | ${font Arial:bold:size=8}${color White}Wired IP address $alignr ${addr eth0} 71 | ${font Arial:bold:size=8}${color Yellow}DHCP ADDRESSES FOR HOTSPOT ${color DarkSlateGray}${hr 2} 72 | ${font Arial:bold:size=8}${color White}${execi 5 cat /var/lib/misc/dnsmasq.leases | awk '{ print $3" "$4 }'} 73 | ${voffset 25} 74 | ${font Arial:bold:size=8}${color Yellow}RADIO TOOLS ${color DarkSlateGray}${hr 2} 75 | ${font Arial:size=08}${if_running piardopc}${color green}ARDOP ACTIVE${else}${color red}ARDOP OFF$endif \ 76 | ${alignr}${if_running rigctld}${color green}RIGCTL ACTIVE${else}${color red}RIGCTL OFF$endif 77 | ${if_running kissattach}${color green}KISSATCH ACTIVE${else}${color red}KISSATCH OFF$endif \ 78 | ${alignr}${if_running direwolf}${color green}DIREWOLF ACTIVE${else}${color red}DIREWOLF OFF$endif 79 | # 80 | ${font Arial:bold:size=8}${color Yellow}DIGITAL APPS ${color DarkSlateGray}${hr 2} 81 | ${font Arial:size=08}${if_running js8call}${color green}JS8 ACTIVE${else}${color red}JS8 OFF$endif \ 82 | ${alignr}${if_running flrig}${color green}FLRIG ACTIVE${else}${color red}FLRIG OFF$endif 83 | ${if_running garim}${color green}GARIM ACTIVE${else}${color red}GARIM OFF$endif \ 84 | ${alignr}${if_running fldigi}${color green}FLDIGI ACTIVE${else}${color red}FLDIGI OFF$endif 85 | ${if_running pavucontrol}${color green}PULSE ACTIVE${else}${color red}PULSE OFF$endif \ 86 | ${alignr}${if_running pat}${color green}PAT ACTIVE${else}${color red}PAT OFF$endif 87 | # 88 | ${font Arial:bold:size=8}${color Yellow}RECENT LOG ENTRIES ${color DarkSlateGray}${hr 2} 89 | ${font Arial:bold:size=6}${color White}${tail ~/Documents/mylog.txt 5} 90 | 91 | 92 | 93 | #$diskio 94 | ]]; -------------------------------------------------------------------------------- /conky/conky-large: -------------------------------------------------------------------------------- 1 | conky.config = { 2 | background = true, 3 | use_xft = true, 4 | font = '123:size=8', 5 | xftalpha = 0.5, 6 | update_interval = 0.5, 7 | total_run_times = 0, 8 | own_window = true, 9 | own_window_type = 'normal', 10 | own_window_transparent = true, 11 | own_window_hints = 'undecorated,below,sticky,skip_taskbar,skip_pager', 12 | double_buffer = true, 13 | minimum_width = 250, minimum_height = 5, 14 | maximum_width = 400, 15 | draw_shades = false, 16 | draw_outline = false, 17 | draw_borders = false, 18 | draw_graph_borders = false, 19 | default_color = 'gray', 20 | default_shade_color = 'red', 21 | default_outline_color = 'green', 22 | alignment = 'top_right', 23 | gap_x = 10, 24 | gap_y = 10, 25 | no_buffers = true, 26 | uppercase = false, 27 | cpu_avg_samples = 2, 28 | net_avg_samples = 1, 29 | override_utf8_locale = true, 30 | use_spacer = 'right', 31 | }; 32 | 33 | conky.text = [[ 34 | 35 | ${voffset 15} 36 | ${font Arial:size=30}${color Yellow}${alignc}N0CALL 37 | ${voffset -45} 38 | ${font Arial:bold:size=18}${color White}Gridsquare ${alignr}${color Yellow}${execi 60 cat /run/user/1000/gridinfo.txt | cut -c1-8} 39 | #${font Arial:bold:size=18}${color White}Radio Freq ${alignr}${color Yellow}${execi 5 $HOME/bin/conky/get-freq | cut -c1-6} 40 | #${font Arial:bold:size=18}${color White}Radio Freq A ${if_match "VFOA" == "${execi 5 $HOME/bin/conky/get-vfo}"}*$endif\ 41 | #${alignr}${color Yellow}${execi 5 $HOME/bin/conky/get-freq VFOA | cut -c1-7} 42 | #${font Arial:bold:size=18}${color White}Radio Freq B ${if_match "VFOB" == "${execi 5 $HOME/bin/conky/get-vfo}"}*$endif\ 43 | #${alignr}${color Yellow}${execi 5 $HOME/bin/conky/get-freq VFOB | cut -c1-7} 44 | 45 | ${color Yellow}LOCAL${alignr}ZULU 46 | ${voffset -45} 47 | ${color DarkSlateGray}${hr 2} 48 | ${voffset -35} 49 | ${font Arial:bold:size=25}${color White}${time %H:%M:%S}\ 50 | ${alignr}${tztime Zulu %H:%M:%S} 51 | ${font Arial:bold:size=25}${color White}${time %d%b%y}\ 52 | ${alignr}${tztime Zulu %d%b%y} 53 | 54 | 55 | ${voffset -245} 56 | 57 | 58 | ${color grey} 59 | ${font} 60 | ${font Arial:bold:size=14}${color Yellow}SYSTEM ${color DarkSlateGray} ${hr 2} 61 | ${font Arial:bold:size=14}${color White}Frequency $alignr${freq_g cpu0}Ghz 62 | ${font Arial:bold:size=14}${color White}Uptime $alignr${uptime} 63 | #TEMP 64 | ${font Arial:bold:size=14}${color White}Temp: $alignr ${exec /usr/bin/vcgencmd measure_temp | awk -F "[=']" '{print($2 * 1.8)+32}'} F 65 | ${voffset -15} 66 | ${font Arial:bold:size=10}${color White}CPU${alignr}${cpu}% 67 | ${cpubar cpu} 68 | ${font Arial:bold:size=10}${color White}MEM $alignc $mem / $memmax $alignr $memperc% 69 | $membar 70 | ${font Arial:bold:size=10}${color White}SWAP $alignc $swap / $swapmax $alignr $swapperc% 71 | $swapbar 72 | ${font Arial:bold:size=10}${color White}HDD $alignc ${fs_used /home} / ${fs_size /home} $alignr ${fs_free_perc /home}% 73 | ${fs_bar /home} 74 | 75 | ${font Arial:bold:size=14}${color Yellow}NETWORK/HOTSPOT ${color DarkSlateGray}${hr 2} 76 | ${font Arial:bold:size=14}${color White}Wireless IP address $alignr ${addr wlan0} 77 | ${font Arial:bold:size=14}${color White}Wired IP address $alignr ${addr eth0} 78 | ${font Arial:bold:size=14}${color Yellow}DHCP ADDRESSES FOR HOTSPOT ${color DarkSlateGray}${hr 2} 79 | ${font Arial:bold:size=12}${color White}${execi 5 cat /var/lib/misc/dnsmasq.leases | awk '{ print $3" "$4 }'} 80 | 81 | ${font Arial:bold:size=14}${color Yellow}RADIO TOOLS ${color DarkSlateGray}${hr 2} 82 | ${font Arial:size=12}${if_running piardopc}${color green}ARDOP ACTIVE${else}${color red}ARDOP OFF$endif \ 83 | ${alignr}${if_running rigctld}${color green}RIGCTL ACTIVE${else}${color red}RIGCTL OFF$endif 84 | ${if_running kissattach}${color green}KISSATCH ACTIVE${else}${color red}KISSATCH OFF$endif \ 85 | ${alignr}${if_running direwolf}${color green}DIREWOLF ACTIVE${else}${color red}DIREWOLF OFF$endif 86 | 87 | ${font Arial:bold:size=14}${color Yellow}DIGITAL APPS ${color DarkSlateGray}${hr 2} 88 | ${font Arial:size=12}${if_running js8call}${color green}JS8 ACTIVE${else}${color red}JS8 OFF$endif \ 89 | ${alignr}${if_running flrig}${color green}FLRIG ACTIVE${else}${color red}FLRIG OFF$endif 90 | ${if_running garim}${color green}GARIM ACTIVE${else}${color red}GARIM OFF$endif \ 91 | ${alignr}${if_running fldigi}${color green}FLDIGI ACTIVE${else}${color red}FLDIGI OFF$endif 92 | ${if_running pavucontrol}${color green}PULSE ACTIVE${else}${color red}PULSE OFF$endif \ 93 | ${alignr}${if_running pat}${color green}PAT ACTIVE${else}${color red}PAT OFF$endif 94 | 95 | ${font Arial:bold:size=14}${color Yellow}RECENT LOG ENTRIES ${color DarkSlateGray}${hr 2} 96 | ${font Arial:bold:size=10}${color White}${tail ~/Documents/mylog.txt 5} 97 | 98 | 99 | 100 | #$diskio 101 | ]]; 102 | -------------------------------------------------------------------------------- /conky/conky-logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/km4ack/pi-build/e7e42c4cb5643c0eceb1ae82e11c36925101b78f/conky/conky-logo.png -------------------------------------------------------------------------------- /conky/conky-medium: -------------------------------------------------------------------------------- 1 | conky.config = { 2 | background = true, 3 | use_xft = true, 4 | font = '123:size=8', 5 | xftalpha = 0.5, 6 | update_interval = 0.5, 7 | total_run_times = 0, 8 | own_window = true, 9 | own_window_type = 'normal', 10 | own_window_transparent = true, 11 | own_window_hints = 'undecorated,below,sticky,skip_taskbar,skip_pager', 12 | double_buffer = true, 13 | minimum_width = 250, minimum_height = 5, 14 | maximum_width = 250, 15 | draw_shades = false, 16 | draw_outline = false, 17 | draw_borders = false, 18 | draw_graph_borders = false, 19 | default_color = 'gray', 20 | default_shade_color = 'red', 21 | default_outline_color = 'green', 22 | alignment = 'top_right', 23 | gap_x = 10, 24 | gap_y = 10, 25 | no_buffers = true, 26 | uppercase = false, 27 | cpu_avg_samples = 2, 28 | net_avg_samples = 1, 29 | override_utf8_locale = true, 30 | use_spacer = 'right', 31 | }; 32 | 33 | conky.text = [[ 34 | 35 | ${font Arial:size=18}${color Yellow}${alignc}N0CALL 36 | ${voffset -25} 37 | ${font Arial:bold:size=12}${color White}Gridsquare ${alignr}${color Yellow}${execi 60 cat /run/user/1000/gridinfo.txt | cut -c1-8} 38 | #${font Arial:bold:size=12}${color White}Radio Freq ${alignr}${color Yellow}${execi 5 $HOME/bin/conky/get-freq | cut -c1-6} 39 | #${font Arial:bold:size=12}${color White}Radio Freq A ${if_match "VFOA" == "${execi 5 $HOME/bin/conky/get-vfo}"}*$endif\ 40 | #${alignr}${color Yellow}${execi 5 $HOME/bin/conky/get-freq VFOA | cut -c1-7} 41 | #${font Arial:bold:size=12}${color White}Radio Freq B ${if_match "VFOB" == "${execi 5 $HOME/bin/conky/get-vfo}"}*$endif\ 42 | #${alignr}${color Yellow}${execi 5 $HOME/bin/conky/get-freq VFOB | cut -c1-7} 43 | ${color Yellow}LOCAL${alignr}ZULU 44 | ${color DarkSlateGray}${hr 2} 45 | ${font Arial:bold:size=15}${color White}${time %H:%M:%S}\ 46 | ${alignr}${tztime Zulu %H:%M:%S} 47 | ${font Arial:bold:size=15}${color White}${time %d%b%y}\ 48 | ${alignr}${tztime Zulu %d%b%y} 49 | 50 | 51 | ${voffset -165} 52 | 53 | 54 | ${color grey} 55 | ${font} 56 | ${font Arial:bold:size=10}${color Yellow}SYSTEM ${color DarkSlateGray} ${hr 2} 57 | ${font Arial:bold:size=10}${color White}Frequency $alignr${freq_g cpu0}Ghz 58 | ${font Arial:bold:size=10}${color White}Uptime $alignr${uptime} 59 | #TEMP 60 | ${font Arial:bold:size=10}${color White}Temp: $alignr ${exec /usr/bin/vcgencmd measure_temp | awk -F "[=']" '{print($2 * 1.8)+32}'} F 61 | ${voffset -15} 62 | ${font Arial:bold:size=8}${color White}CPU${alignr}${cpu}% 63 | ${cpubar cpu} 64 | ${font Arial:bold:size=8}${color White}MEM $alignc $mem / $memmax $alignr $memperc% 65 | $membar 66 | ${font Arial:bold:size=8}${color White}SWAP $alignc $swap / $swapmax $alignr $swapperc% 67 | $swapbar 68 | ${font Arial:bold:size=8}${color White}HDD $alignc ${fs_used /home} / ${fs_size /home} $alignr ${fs_free_perc /home}% 69 | ${fs_bar /home} 70 | 71 | ${font Arial:bold:size=10}${color Yellow}NETWORK/HOTSPOT ${color DarkSlateGray}${hr 2} 72 | ${font Arial:bold:size=10}${color White}Wireless IP address $alignr ${addr wlan0} 73 | ${font Arial:bold:size=10}${color White}Wired IP address $alignr ${addr eth0} 74 | ${font Arial:bold:size=10}${color Yellow}DHCP ADDRESSES FOR HOTSPOT ${color DarkSlateGray}${hr 2} 75 | ${font Arial:bold:size=10}${color White}${execi 5 cat /var/lib/misc/dnsmasq.leases | awk '{ print $3" "$4 }'} 76 | 77 | ${font Arial:bold:size=10}${color Yellow}RADIO TOOLS ${color DarkSlateGray}${hr 2} 78 | ${font Arial:size=08}${if_running piardopc}${color green}ARDOP ACTIVE${else}${color red}ARDOP OFF$endif \ 79 | ${alignr}${if_running rigctld}${color green}RIGCTL ACTIVE${else}${color red}RIGCTL OFF$endif 80 | ${if_running kissattach}${color green}KISSATCH ACTIVE${else}${color red}KISSATCH OFF$endif \ 81 | ${alignr}${if_running direwolf}${color green}DIREWOLF ACTIVE${else}${color red}DIREWOLF OFF$endif 82 | 83 | ${font Arial:bold:size=10}${color Yellow}DIGITAL APPS ${color DarkSlateGray}${hr 2} 84 | ${font Arial:size=08}${if_running js8call}${color green}JS8 ACTIVE${else}${color red}JS8 OFF$endif \ 85 | ${alignr}${if_running flrig}${color green}FLRIG ACTIVE${else}${color red}FLRIG OFF$endif 86 | ${if_running garim}${color green}GARIM ACTIVE${else}${color red}GARIM OFF$endif \ 87 | ${alignr}${if_running fldigi}${color green}FLDIGI ACTIVE${else}${color red}FLDIGI OFF$endif 88 | ${if_running pavucontrol}${color green}PULSE ACTIVE${else}${color red}PULSE OFF$endif \ 89 | ${alignr}${if_running pat}${color green}PAT ACTIVE${else}${color red}PAT OFF$endif 90 | 91 | ${font Arial:bold:size=10}${color Yellow}RECENT LOG ENTRIES ${color DarkSlateGray}${hr 2} 92 | ${font Arial:bold:size=08}${color White}${tail ~/Documents/mylog.txt 5} 93 | 94 | 95 | 96 | #$diskio 97 | ]]; 98 | -------------------------------------------------------------------------------- /conky/conky-small: -------------------------------------------------------------------------------- 1 | conky.config = { 2 | background = true, 3 | use_xft = true, 4 | font = '123:size=8', 5 | xftalpha = 0.5, 6 | update_interval = 0.5, 7 | total_run_times = 0, 8 | own_window = true, 9 | own_window_type = 'normal', 10 | own_window_transparent = true, 11 | own_window_hints = 'undecorated,below,sticky,skip_taskbar,skip_pager', 12 | double_buffer = true, 13 | minimum_width = 200, minimum_height = 5, 14 | maximum_width = 200, 15 | draw_shades = false, 16 | draw_outline = false, 17 | draw_borders = false, 18 | draw_graph_borders = false, 19 | default_color = 'gray', 20 | default_shade_color = 'red', 21 | default_outline_color = 'green', 22 | alignment = 'top_right', 23 | gap_x = 10, 24 | gap_y = 10, 25 | no_buffers = true, 26 | uppercase = false, 27 | cpu_avg_samples = 2, 28 | net_avg_samples = 1, 29 | override_utf8_locale = true, 30 | use_spacer = 'right', 31 | }; 32 | 33 | conky.text = [[ 34 | 35 | ${font Arial:size=12}${color Yellow}${alignc}N0CALL 36 | ${voffset -20} 37 | ${font Arial:bold:size=08}${color White}Gridsquare ${alignr}${color Yellow}${execi 60 cat /run/user/1000/gridinfo.txt | cut -c1-8} 38 | #${font Arial:bold:size=12}${color White}Radio Freq ${alignr}${color Yellow}${execi 5 $HOME/bin/conky/get-freq | cut -c1-6} 39 | #${font Arial:bold:size=12}${color White}Radio Freq A ${if_match "VFOA" == "${execi 5 $HOME/bin/conky/get-vfo}"}*$endif\ 40 | #${alignr}${color Yellow}${execi 5 $HOME/bin/conky/get-freq VFOA | cut -c1-7} 41 | #${font Arial:bold:size=12}${color White}Radio Freq B ${if_match "VFOB" == "${execi 5 $HOME/bin/conky/get-vfo}"}*$endif\ 42 | #${alignr}${color Yellow}${execi 5 $HOME/bin/conky/get-freq VFOB | cut -c1-7} 43 | ${color Yellow}LOCAL${alignr}ZULU 44 | ${voffset -20} 45 | ${color DarkSlateGray}${hr 2} 46 | ${font Arial:bold:size=08}${color White}${time %H:%M:%S}\ 47 | ${alignr}${tztime Zulu %H:%M:%S} 48 | ${font Arial:bold:size=08}${color White}${time %d%b%y}\ 49 | ${alignr}${tztime Zulu %d%b%y} 50 | 51 | 52 | ${voffset -85} 53 | 54 | 55 | ${color grey} 56 | ${font} 57 | ${font Arial:bold:size=08}${color Yellow}SYSTEM ${color DarkSlateGray} ${hr 2} 58 | ${font Arial:bold:size=08}${color White}Frequency $alignr${freq_g cpu0}Ghz 59 | ${font Arial:bold:size=08}${color White}Uptime $alignr${uptime} 60 | #TEMP 61 | ${font Arial:bold:size=08}${color White}Temp: $alignr ${exec /usr/bin/vcgencmd measure_temp | awk -F "[=']" '{print($2 * 1.8)+32}'} F 62 | ${voffset -10} 63 | ${font Arial:bold:size=6}${color White}CPU${alignr}${cpu}% 64 | ${cpubar cpu} 65 | ${font Arial:bold:size=6}${color White}MEM $alignc $mem / $memmax $alignr $memperc% 66 | $membar 67 | ${font Arial:bold:size=6}${color White}SWAP $alignc $swap / $swapmax $alignr $swapperc% 68 | $swapbar 69 | ${font Arial:bold:size=6}${color White}HDD $alignc ${fs_used /home} / ${fs_size /home} $alignr ${fs_free_perc /home}% 70 | ${fs_bar /home} 71 | 72 | ${font Arial:bold:size=8}${color Yellow}NETWORK/HOTSPOT ${color DarkSlateGray}${hr 2} 73 | ${font Arial:bold:size=8}${color White}Wireless IP address $alignr ${addr wlan0} 74 | ${font Arial:bold:size=8}${color White}Wired IP address $alignr ${addr eth0} 75 | ${font Arial:bold:size=8}${color Yellow}DHCP ADDRESSES FOR HOTSPOT ${color DarkSlateGray}${hr 2} 76 | ${font Arial:bold:size=8}${color White}${execi 5 cat /var/lib/misc/dnsmasq.leases | awk '{ print $3" "$4 }'} 77 | ${voffset 25} 78 | ${font Arial:bold:size=8}${color Yellow}RADIO TOOLS ${color DarkSlateGray}${hr 2} 79 | ${font Arial:size=08}${if_running piardopc}${color green}ARDOP ACTIVE${else}${color red}ARDOP OFF$endif \ 80 | ${alignr}${if_running rigctld}${color green}RIGCTL ACTIVE${else}${color red}RIGCTL OFF$endif 81 | ${if_running kissattach}${color green}KISSATCH ACTIVE${else}${color red}KISSATCH OFF$endif \ 82 | ${alignr}${if_running direwolf}${color green}DIREWOLF ACTIVE${else}${color red}DIREWOLF OFF$endif 83 | 84 | ${font Arial:bold:size=8}${color Yellow}DIGITAL APPS ${color DarkSlateGray}${hr 2} 85 | ${font Arial:size=08}${if_running js8call}${color green}JS8 ACTIVE${else}${color red}JS8 OFF$endif \ 86 | ${alignr}${if_running flrig}${color green}FLRIG ACTIVE${else}${color red}FLRIG OFF$endif 87 | ${if_running garim}${color green}GARIM ACTIVE${else}${color red}GARIM OFF$endif \ 88 | ${alignr}${if_running fldigi}${color green}FLDIGI ACTIVE${else}${color red}FLDIGI OFF$endif 89 | ${if_running pavucontrol}${color green}PULSE ACTIVE${else}${color red}PULSE OFF$endif \ 90 | ${alignr}${if_running pat}${color green}PAT ACTIVE${else}${color red}PAT OFF$endif 91 | 92 | ${font Arial:bold:size=8}${color Yellow}RECENT LOG ENTRIES ${color DarkSlateGray}${hr 2} 93 | ${font Arial:bold:size=6}${color White}${tail ~/Documents/mylog.txt 5} 94 | 95 | 96 | 97 | #$diskio 98 | ]]; 99 | -------------------------------------------------------------------------------- /conky/get-freq: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | #get freq of radio to display in conky 4 | #optional parameter: VFOA VFOB 5 | #20191217 km4ack 6 | #20200428 modified 7 | 8 | source "$HOME/patmenu2/config" 9 | 10 | MAIN () { 11 | 12 | # If first argument, $1, is empty or unset, use 'VFOA' as its value. 13 | VFO=${1:-'VFOA'} 14 | 15 | FREQ=$($RIG -o f "$VFO") 16 | FREQCH=$(echo "$FREQ" | grep error) 17 | 18 | if [ -z "$FREQCH" ] 19 | then 20 | HZ_TO_MHZ "$FREQ" 21 | else 22 | MAIN "$1" 23 | fi 24 | 25 | } 26 | 27 | HZ_TO_MHZ () { 28 | 29 | #Inject decimal into number six places from right. 30 | #First, and only, parameter expected to be a string of six or more digits 31 | 32 | DP=. 33 | SIX_DIGITS='[0-9][0-9][0-9][0-9][0-9][0-9]' 34 | MHZ="${1%%$SIX_DIGITS}" 35 | HZ="${1##$MHZ}" 36 | printf "%s$DP%s\n" "$MHZ" "$HZ" 37 | 38 | } 39 | 40 | MAIN "$1" 41 | -------------------------------------------------------------------------------- /conky/get-grid: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env ruby 2 | 3 | require 'gpsd_client' 4 | require 'maidenhead' 5 | require 'socket' 6 | require 'json' 7 | 8 | ft8call_port = 2237 9 | 10 | gpsd = GpsdClient::Gpsd.new() 11 | gpsd.start() 12 | apicmd = {} 13 | 14 | # get maidenhead if gps is ready 15 | if gpsd.started? 16 | pos = gpsd.get_position 17 | maid = Maidenhead.to_maidenhead(pos[:lat], pos[:lon], precision = 5) 18 | # puts "lat = #{pos[:lat]}, lon = #{pos[:lon]}, grid = #{maid}" 19 | apicmd = {:type => "STATION.SET_GRID", :value => maid} 20 | end 21 | 22 | puts "#{maid}" 23 | 24 | -------------------------------------------------------------------------------- /conky/get-vfo: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | #get VFO of radio to display in conky 4 | #20200428 5 | 6 | source "$HOME/patmenu2/config" 7 | 8 | MAIN () { 9 | 10 | VFO=$($RIG v) 11 | VFOCH=$(echo "$VFO" | grep error) 12 | 13 | if [ -z "$VFOCH" ] 14 | then 15 | echo "$VFO" 16 | else 17 | MAIN 18 | fi 19 | 20 | } 21 | 22 | MAIN 23 | -------------------------------------------------------------------------------- /conky/grid: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | #script get maidenhead from GPS for display in conky 4 | #called by cronjob 5 | #04FEB2021 KM4ACK 6 | 7 | GRID=$($HOME/bin/conky/get-grid) 8 | GRIDCH=$(echo $GRID | grep -i JJ00) 9 | FILE=/run/user/$UID/gridinfo.txt 10 | 11 | if [ -z "$GRIDCH" ] 12 | then 13 | echo $GRID > $FILE 14 | else 15 | echo "NO GPS" > $FILE 16 | fi -------------------------------------------------------------------------------- /conky/setconky: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | #set conky display size &/or update call sign 4 | #20200123 km4ack 5 | #20200514 edit km4ack 6 | 7 | MYPATH=$HOME/pi-build/conky 8 | TEMPFILE=/run/user/1000/conky.tmp 9 | LOGO=$MYPATH/conky-logo.png 10 | 11 | CALL=$(cat ~/.conkyrc | grep "{color Yellow}" | sed s'/.*{alignc}//' | head -1) 12 | 13 | 14 | INFO=$(yad --form --width=420 --text-align=center --center --title="Preferences" \ 15 | --image $LOGO --window-icon=$LOGO --image-on-top --separator="|" --item-separator="|" \ 16 | --text="Conky Preferences\r\rThis only changes the call sign in conky." \ 17 | --field="Call Sign" "$CALL" \ 18 | --field="Conky Size":CB "conky-small|conky-medium|conky-large|conky-7inch" \ 19 | --field="C or F":CB "C|F" \ 20 | --button="Exit":1 \ 21 | --button="Continue":2) 22 | BUT=$? 23 | if [ $BUT = 252 ] || [ $BUT = 1 ]; then 24 | exit 25 | fi 26 | CALL=$(echo $INFO | awk -F "|" '{ print $1 }') 27 | CALL=${CALL^^} 28 | CS=$(echo $INFO | awk -F "|" '{ print $2 }') 29 | TEMP=$(echo $INFO | awk -F "|" '{ print $3 }') 30 | 31 | 32 | cp $MYPATH/$CS $TEMPFILE 33 | 34 | sed -i "s/N0CALL/$CALL/" $TEMPFILE 35 | 36 | if [ "$TEMP" = 'C' ] && [ "$CS" = 'conky-large' ]; then 37 | #delete F line 38 | echo 39 | sed -i '/vcgencmd/d' $TEMPFILE 40 | #add cel line 41 | sed -i '/#TEMP/a \ 42 | ${font Arial:bold:size=14}${color White}Temp: $alignr ${exec /usr/bin/vcgencmd measure_temp | cut -c6-9} C' $TEMPFILE 43 | 44 | elif [ "$TEMP" = 'C' ] && [ "$CS" = 'conky-medium' ]; then 45 | #delete F line 46 | echo 47 | sed -i '/vcgencmd/d' $TEMPFILE 48 | #add cel line 49 | sed -i '/#TEMP/a \ 50 | ${font Arial:bold:size=10}${color White}Temp: $alignr ${exec /usr/bin/vcgencmd measure_temp | cut -c6-9} C' $TEMPFILE 51 | 52 | elif [ "$TEMP" = 'C' ] && [ "$CS" = 'conky-small' ]; then 53 | #delete F line 54 | sed -i '/vcgencmd/d' $TEMPFILE 55 | #add cel line 56 | sed -i '/#TEMP/a \ 57 | ${font Arial:bold:size=08}${color White}Temp: $alignr ${exec /usr/bin/vcgencmd measure_temp | cut -c6-9} C' $TEMPFILE 58 | 59 | elif [ "$TEMP" = 'C' ] && [ "$CS" = 'conky-7inch' ]; then 60 | #delete F line 61 | echo 62 | sed -i '/vcgencmd/d' $TEMPFILE 63 | #add cel line 64 | sed -i '/#TEMP/a \ 65 | ${font Arial:bold:size=08}${color White}Temp: $alignr ${exec /usr/bin/vcgencmd measure_temp | cut -c6-9} C' $TEMPFILE 66 | fi 67 | 68 | cp $TEMPFILE $HOME/.conkyrc 69 | 70 | sudo killall conky > /dev/null 2>&1 71 | 72 | conky > /dev/null 2>&1 73 | 74 | yad --form --width=420 --text-align=center --center --title="Preferences" \ 75 | --image $LOGO --window-icon=$LOGO --image-on-top --separator="|" --item-separator="|" \ 76 | --text="Conky Preferences\r\rConky is being restarted" \ 77 | --button=gtk-ok -------------------------------------------------------------------------------- /diagnostic: -------------------------------------------------------------------------------- 1 | #! /bin/bash 2 | 3 | #script to gather some system information 4 | #to help diagnose issues 5 | #20200616 km4ack 6 | #11FEB2021 review km4ack 7 | clear 8 | echo 9 | echo 10 | read -rp "What is your call sign? " CALL 11 | 12 | DIR=${HOME}/Desktop/${CALL}-diagnostic-report 13 | 14 | #create temp dir 15 | mkdir -p ${DIR} 16 | 17 | #check to see which apps are installed 18 | CHECK() { 19 | #----------------------------------------------------# 20 | # Hotspot 21 | #----------------------------------------------------# 22 | HOTSPOT="/usr/bin/autohotspotN" 23 | if [ ! -f "${HOTSPOT}" ]; then 24 | HOTSPOT="Not Installed" 25 | else 26 | HOTSPOT="Installed" 27 | fi 28 | 29 | #----------------------------------------------------# 30 | # AX25 31 | #----------------------------------------------------# 32 | if [ ! -d /etc/ax25 ]; then 33 | AX25="Not Installed" 34 | else 35 | AX25="Installed" 36 | fi 37 | #----------------------------------------------------# 38 | # GPS 39 | #----------------------------------------------------# 40 | if ! hash gpsd 2>/dev/null; then 41 | GPS="Not Installed" 42 | else 43 | GPS="Installed" 44 | fi 45 | #----------------------------------------------------# 46 | # PULSE 47 | #----------------------------------------------------# 48 | if ! hash pulseaudio 2>/dev/null; then 49 | PULSE="Not Installed" 50 | else 51 | PULSE="Installed" 52 | fi 53 | #----------------------------------------------------# 54 | # ARDOP 55 | #----------------------------------------------------# 56 | if [ -f ${HOME}/ardop/piardopc ]; then 57 | ARDOP="Installed" 58 | else 59 | ARDOP="Not Installed" 60 | fi 61 | #----------------------------------------------------# 62 | # ARDOP GUI 63 | #----------------------------------------------------# 64 | if [ -f ${HOME}/ardop/piARDOP_GUI ]; then 65 | ARDOPGUI="Installed" 66 | else 67 | ARDOPGUI="Not Installed" 68 | fi 69 | 70 | #----------------------------------------------------# 71 | # RIG CONTROL - HAMLIB 72 | #----------------------------------------------------# 73 | if ! hash rigctl 2>/dev/null; then 74 | RIG="Not_Installed" 75 | else 76 | echo "Checking Rig Control" 77 | RIG=$(rigctl --version | grep Hamlib | sed s/"rigctl(d),\ Hamlib\ "//) 78 | NEWRIG=$(curl -s https://sourceforge.net/projects/hamlib/files/latest/download | 79 | grep -o https://downloads.sourceforge.net/project/hamlib/hamlib/[0-9].[0-9] | 80 | head -n 1 | awk -F "/" '{print $7}') 81 | 82 | if (($(echo "${NEWRIG} ${RIG}" | awk '{print ($1 > $2)}'))); then 83 | RIG=NEEDS-UPDATE 84 | else 85 | RIG="is_latest_version" 86 | fi 87 | fi 88 | 89 | #----------------------------------------------------# 90 | # FLRIG 91 | #----------------------------------------------------# 92 | echo "Checking FLRIG" 93 | if ! hash flrig 2>/dev/null; then 94 | FLRIG="Not_Installed" 95 | else 96 | FLRIG=$(flrig --version | awk 'FNR == 1 {print $2}') 97 | NEWFLRIG=$(curl -s https://sourceforge.net/projects/fldigi/files/flrig/ | 98 | grep .tar.gz | head -1 | awk -F "-" '{print $2}' | awk -F ".tar.gz" '{print $1}') 99 | 100 | if (($(echo "${NEWFLRIG} ${FLRIG}" | awk '{print ($1 > $2)}'))); then 101 | FLRIG=NEEDS-UPDATE 102 | else 103 | FLRIG="is_latest_version" 104 | fi 105 | fi 106 | 107 | #----------------------------------------------------# 108 | # Pat Winlink 109 | #----------------------------------------------------# 110 | echo "Checking Pat Winlink" 111 | if ! hash pat 2>/dev/null; then 112 | PAT="Not_Installed" 113 | else 114 | PAT=$(pat version | awk -F 'v' '{print $2}' | head -c 5) 115 | NEWPAT=$(curl -s https://github.com/la5nta/pat/releases | grep -m 1 "amd64.deb" | 116 | awk -F '_' '{print $2}') 117 | 118 | if (($(echo "${NEWPAT} ${PAT}" | awk '{print ($1 > $2)}'))); then 119 | PAT=NEEDS-UPDATE 120 | else 121 | PAT="is_latest_version" 122 | fi 123 | fi 124 | 125 | #----------------------------------------------------# 126 | # DIREWOLF 127 | #----------------------------------------------------# 128 | echo "Checking Direwolf" 129 | if ! hash direwolf 2>/dev/null; then 130 | DIRE="Not_Installed" 131 | else 132 | DIRE=$(direwolf -S -t 0 | head -1 | sed 's/Dire\ Wolf\ version\ //') 133 | wget -P /tmp/ https://raw.githubusercontent.com/wb2osz/direwolf/master/CHANGES.md >/dev/null 2>&1 134 | NEWDIRE=$(cat /tmp/CHANGES.md | head -5 | tail -1 | awk '{ print $3 }') 135 | 136 | if (($(echo "${NEWDIRE} ${DIRE}" | awk '{print ($1 > $2)}'))); then 137 | DIRE=NEEDS-UPDATE 138 | else 139 | DIRE="is_latest_version" 140 | fi 141 | fi 142 | #----------------------------------------------------# 143 | # Pat Menu 144 | #----------------------------------------------------# 145 | echo "Checking Pat Menu" 146 | if [ ! -d ${HOME}/patmenu2 ]; then 147 | PATMENU="Not_Installed" 148 | else 149 | cd ${HOME}/patmenu2/ || ! echo "Failure" 150 | wget -O ${HOME}/patmenu2/latest https://raw.githubusercontent.com/km4ack/patmenu2/master/changelog >/dev/null 2>&1 151 | LATEST=$(cat ${HOME}/patmenu2/latest | grep '^release' | sed 's/release=//') 152 | CURRENT=$(cat ${HOME}/patmenu2/changelog | grep '^release' | sed 's/release=//') 153 | rm ${HOME}/patmenu2/latest >/dev/null 2>&1 154 | if (($(echo "${LATEST} ${CURRENT}" | awk '{print ($1 > $2)}'))); then 155 | PATMENU="NEEDS-UPDATE" 156 | else 157 | PATMENU="is_latest_version" 158 | fi 159 | fi 160 | 161 | #----------------------------------------------------# 162 | # Hot Spot Tools 163 | #----------------------------------------------------# 164 | if [ ! -d ${HOME}/hotspot-tools2 ]; then 165 | HSTOOLS="Not_Installed" 166 | else 167 | CURRENT=$(cat ${HOME}/hotspot-tools2/changelog | grep version= | sed 's/version=//') 168 | LATEST=$(curl -s https://raw.githubusercontent.com/km4ack/hotspot-tools2/master/changelog | grep version= | sed 's/version=//') 169 | if (($(echo "${LATEST} ${CURRENT}" | awk '{print ($1 > $2)}'))); then 170 | HSTOOLS="NEEDS-UPDATE" 171 | else 172 | HSTOOLS="is_latest_version" 173 | fi 174 | fi 175 | 176 | #----------------------------------------------------# 177 | # EES 178 | #----------------------------------------------------# 179 | if [ -f /var/www/html/email.php ]; then 180 | EES="Installed" 181 | else 182 | EES="Not Installed" 183 | fi 184 | 185 | #----------------------------------------------------# 186 | # CONKY 187 | #----------------------------------------------------# 188 | if [ -f ${HOME}/.conkyrc ]; then 189 | CONKY=Installed 190 | else 191 | CONKY="Not Installed" 192 | fi 193 | 194 | } 195 | CHECK 196 | 197 | #get system info 198 | WHO=$(whoami) 199 | KERNAL=$(uname -r) 200 | echo "User Name is ${WHO}" >${DIR}/systeminfo.txt 201 | echo "" >>${DIR}/systeminfo.txt 202 | echo "Kernal version is ${KERNAL}" >>${DIR}/systeminfo.txt 203 | echo "" >>${DIR}/systeminfo.txt 204 | cat /etc/os-release >>${DIR}/systeminfo.txt 205 | echo 206 | echo 207 | echo "#####uname######" >>${DIR}/systeminfo.txt 208 | uname -a >>${DIR}/systeminfo.txt 209 | 210 | #get direwolf.conf file 211 | cat ${HOME}/direwolf.conf >${DIR}/direwolf.conf 212 | 213 | #get pat config file 214 | PAT_VERSION=$(pat version | awk '{print $2}' | sed 's/v0.//;s/.0//') 215 | 216 | if [ "$PAT_VERSION" -le 11 ]; then 217 | PAT_CONFIG=${HOME}/.wl2k/config.json 218 | else 219 | PAT_CONFIG=$XDG_CONFIG_HOME/pat/config.json 220 | fi 221 | cat $PAT_CONFIG >${DIR}/patconfig.txt 222 | #remove winlink password 223 | sed -i 's/"secure_login_password":.*$/PASSWORD-REMOVED-FOR-YOUR-SECURITY/' ${DIR}/patconfig.txt 224 | 225 | #get pat menu config file 226 | cat ${HOME}/patmenu2/config >${DIR}/patmenu.conf 227 | 228 | #Get wpa_supplicant 229 | sudo cat /etc/wpa_supplicant/wpa_supplicant.conf >${DIR}/wpa.txt 230 | sed -i 's/psk=.*$/PASSWORD-REMOVED/' ${DIR}/wpa.txt 231 | 232 | #get sound info 233 | echo "" >>${DIR}/sound.info 234 | echo "ARECORD INFO" >${DIR}/sound.info 235 | arecord -l >>${DIR}/sound.info 236 | echo "" >>${DIR}/sound.info 237 | echo "" >>${DIR}/sound.info 238 | echo "APLAY INFO" >>${DIR}/sound.info 239 | aplay -l >>${DIR}/sound.info 240 | echo "" >>${DIR}/sound.info 241 | echo "" >>${DIR}/sound.info 242 | echo "Using sound card" >>${DIR}/sound.info 243 | sudo lsof /dev/snd/* >>${DIR}/sound.info 244 | 245 | #Get hotspot info 246 | HS=$(systemctl is-active autohotspot) 247 | CURRENTNAME=$(sudo cat /etc/hostapd/hostapd.conf | grep ssid= | head -1 | sed 's/ssid=//') 248 | CURRENTPASS=$(sudo cat /etc/hostapd/hostapd.conf | grep wpa_passphrase= | sed 's/wpa_passphrase=//') 249 | HSIP=$(sudo cat /usr/bin/autohotspotN | grep "ip a add" | sed 's/ip\ a\ add\ //' | sed 's/\/24.*$//' | tr -d " ") 250 | WIREIP=$(ifconfig | grep -A 1 eth0 | grep inet | awk '{ print $2 }') 251 | HSS=$(sudo cat /usr/bin/autohotspotN | grep "ip a add" | awk '{ print $4 }' | sed 's/\/24//') 252 | CIP=$(ifconfig | grep -A 1 wlan0 | grep inet | awk '{ print $2 }') 253 | CHECK=$(ls /etc/wpa_supplicant/ | grep FORCE) 254 | AUTORUN=$(crontab -l | grep autohotspotN | awk '{print $1}' | sed 's/*\///') 255 | if [ -z "$CHECK" ]; then 256 | FORCE="Hotspot Not in force mode" 257 | else 258 | FORCE="Hotspot IS in force mode" 259 | fi 260 | 261 | if [ ${HSS} = ${CIP} ]; then 262 | HSS=ACTIVE 263 | else 264 | HSS=INACTIVE 265 | fi 266 | 267 | FILE=${DIR}/hotspot.info 268 | 269 | echo "Hotspot status ${HS}" >${FILE} 270 | echo "Hotspot state ${HSS}" >>${FILE} 271 | echo "Hotspot Name is ${CURRENTNAME}" >>${FILE} 272 | echo "Hotspot IP = ${HSIP}" >>${FILE} 273 | echo "Wireless IP = ${CIP}" >>${FILE} 274 | echo "CAT5 IP = ${WIREIP}" >>${FILE} 275 | echo "${FORCE}" >>${FILE} 276 | echo "crontab set to auto run ever ${AUTORUN} minutes" >>${FILE} 277 | 278 | #get cron contents 279 | crontab -l >${DIR}/cron.txt 280 | 281 | #get gps info 282 | GPSD=$(systemctl is-active gpsd) 283 | CHRONY=$(systemctl is-active chronyd) 284 | echo "/etc/default/gpsd file contents" >${DIR}/gps.info 285 | echo 286 | echo >>${DIR}/gps.info 287 | cat /etc/default/gpsd >>${DIR}/gps.info 288 | echo 289 | echo 290 | echo >>${DIR}/gps.info 291 | echo "GPSD is $GPSD" >>${DIR}/gps.info 292 | echo "Chrony is $CHRONY" >>${DIR}/gps.info 293 | echo 294 | echo 295 | echo "#####TIME SOURCES#####" >>${DIR}/gps.info 296 | chronyc sources -v >>${DIR}/gps.info 297 | 298 | #Check installed apps 299 | echo "Hotspot $HOTSPOT" >${DIR}/apps.info 300 | echo "HS Tools $HSTOOLS" >>${DIR}/apps.info 301 | echo "AX25 $AX25" >>${DIR}/apps.info 302 | echo "GPS $GPS" >>${DIR}/apps.info 303 | echo "Pulse $PULSE" >>${DIR}/apps.info 304 | echo "ARDOP GUI $ARDOPGUI" >>${DIR}/apps.info 305 | echo "CONKY $CONKY" >>${DIR}/apps.info 306 | echo "HAMLIB $RIG" >>${DIR}/apps.info 307 | echo "FLRIG $FLRIG" >>${DIR}/apps.info 308 | echo "PAT $PAT" >>${DIR}/apps.info 309 | echo "DIREWOLF $DIRE" >>${DIR}/apps.info 310 | echo "Pat Menu $PATMENU" >>${DIR}/apps.info 311 | echo "EES $EES" >>${DIR}/apps.info 312 | 313 | cd ${HOME}/Desktop || ! echo "Failure" 314 | zip -r ${CALL}-diagnostic.zip ${DIR} >/dev/null 2>&1 315 | 316 | rm -rf ${DIR} >/dev/null 2>&1 317 | clear 318 | echo 319 | echo 320 | 321 | cat </dev/null 2>&1 21 | 22 | #install hostapd, dnsmasq 23 | apt-get install -y hostapd 24 | apt-get install -y dnsmasq 25 | 26 | #remove hostapd mask 27 | systemctl unmask hostapd 28 | 29 | #stop both services 30 | systemctl disable hostapd 31 | systemctl disable dnsmasq 32 | 33 | mkdir -p ${HOME}/temp 34 | cd ${HOME}/temp || return 35 | 36 | wget http://www.raspberryconnect.com/images/Autohotspot/autohotspot-95-4/hostapd.txt 37 | 38 | #set new hotspot passwd 39 | sed -i "s|wpa_passphrase=1234567890|wpa_passphrase=${wifipasswd}|" ${HOME}/temp/hostapd.txt 40 | #set country to US 41 | sed -i 's/country_code=GB/country_code=US/' ${HOME}/temp/hostapd.txt 42 | 43 | #move hostapd to correct location 44 | mv ${HOME}/temp/hostapd.txt /etc/hostapd/hostapd.conf 45 | 46 | sed -i s'/#DAEMON_CONF=""/DAEMON_CONF="\/etc\/hostapd\/hostapd.conf"/' /etc/default/hostapd 47 | sed -i s'/DAEMON_OPTS=""/#DAEMON_OPTS=""/' /etc/default/hostapd 48 | 49 | #add needed info to dnsmasq.conf 50 | echo "#AutoHotspot config" >>/etc/dnsmasq.conf 51 | echo "interface=wlan0" >>/etc/dnsmasq.conf 52 | echo "bind-dynamic" >>/etc/dnsmasq.conf 53 | echo "server=8.8.8.8" >>/etc/dnsmasq.conf 54 | echo "domain-needed" >>/etc/dnsmasq.conf 55 | echo "bogus-priv" >>/etc/dnsmasq.conf 56 | echo "dhcp-range=10.10.10.150,10.10.10.200,255.255.255.0,12h" >>/etc/dnsmasq.conf 57 | echo "#Set up redirect for email.com" >>/etc/dnsmasq.conf 58 | echo "dhcp-option=3,10.10.10.10" >>/etc/dnsmasq.conf 59 | echo "address=/email.com/10.10.10.10" >>/etc/dnsmasq.conf 60 | 61 | mv /etc/network/interfaces /etc/network/interfaces.org 62 | 63 | echo "source-directory /etc/network/interfaces.d" >>/etc/network/interfaces 64 | 65 | echo "nohook wpa_supplicant" >>/etc/dhcpcd.conf 66 | 67 | #setup ip forward 68 | sed 's/#net.ipv4.ip_forward=1/net.ipv4.ip_forward=1/' /etc/sysctl.conf 69 | 70 | cd ${HOME}/temp || return 71 | 72 | wget http://www.raspberryconnect.com/images/autohotspotN/autohotspotn-95-4/autohotspot-service.txt 73 | 74 | #create autohotspot service file 75 | mv autohotspot-service.txt /etc/systemd/system/autohotspot.service 76 | 77 | #start autohotspot service 78 | systemctl enable autohotspot.service 79 | 80 | #check if iw installed. install if not 81 | 82 | iwcheck=$(dpkg --get-selections | grep -w "iw") 83 | if [ -z "iw" ]; then #THIS MIGHT NEED TO SOME LOOKING AT -- SEE SC2157 84 | apt-get install iw 85 | fi 86 | 87 | #install autohotspot script 88 | cd ${HOME}/temp || return 89 | wget http://www.raspberryconnect.com/images/autohotspotN/autohotspotn-95-4/autohotspotN.txt 90 | #mod ip address for our custom setup 91 | sed -i 's/192.168.50.5/10.10.10.10/' autohotspotN.txt 92 | mv autohotspotN.txt /usr/bin/autohotspotN 93 | chmod +x /usr/bin/autohotspotN 94 | 95 | #add shack wifi to wpa_supplicant.conf 96 | echo "network={" >>/etc/wpa_supplicant/wpa_supplicant.conf 97 | echo "ssid=\"$shackwifi\"" >>/etc/wpa_supplicant/wpa_supplicant.conf 98 | echo "psk=\"$shackpass\"" >>/etc/wpa_supplicant/wpa_supplicant.conf 99 | echo "key_mgmt=WPA-PSK" >>/etc/wpa_supplicant/wpa_supplicant.conf 100 | echo "}" >>/etc/wpa_supplicant/wpa_supplicant.conf 101 | -------------------------------------------------------------------------------- /functions/base.function: -------------------------------------------------------------------------------- 1 | #this installs the basic software for build-a-pi 2 | #km4ack 20200513 3 | 4 | TEMPCRON=${MYPATH}/cron.tmp 5 | DIR=${MYPATH}/temp 6 | mkdir -p ${DIR} 7 | BUILDDIR=$HOME/.bap-source-files 8 | mkdir -p ${BUILDDIR} 9 | 10 | source ${MYPATH}/config 11 | 12 | CLEANSOURCE(){ 13 | #this function removes any old source files before 14 | #new files are downloaded for installation. This 15 | #function is called by install functions below. 16 | PACKAGE=$(ls $BUILDDIR | grep $PACKAGE) 17 | if [ -d $BUILDDIR/$PACKAGE ]; then 18 | sudo rm -rf $BUILDDIR/$PACKAGE* 19 | fi 20 | } 21 | 22 | ################################ 23 | # HOTSPOT 24 | ################################ 25 | HOTSPOT() { 26 | HS="/usr/bin/autohotspotN" 27 | if [ ! -f "${HS}" ]; then 28 | #pass variables with script because run as root 29 | sudo bash ${MYPATH}/functions/autohotspot "${SHACKSSID}" "${SHACKPASS}" "${HSPASS}" 30 | echo "*/5 * * * * sudo /usr/bin/autohotspotN >/dev/null 2>&1" >>${TEMPCRON} 31 | else 32 | echo ################################ 33 | echo ################################ 34 | echo " FATAL ERROR" 35 | echo "HOTSPOT ALREADY INSTALLED ONCE" 36 | echo " CANNOT INSTALL AGAIN" 37 | echo " WILL CONTINUE IN 10 SECONDS" 38 | echo ################################ 39 | echo ################################ 40 | sleep 10 41 | fi 42 | } 43 | 44 | ################################ 45 | # HOTSPOT TOOLS 46 | ################################ 47 | HSTOOLS() { 48 | if [ -d ${HOME}/hotspot-tools2 ]; then 49 | rm -rf ${HOME}/hotspot-tools2 50 | fi 51 | git clone https://github.com/km4ack/hotspot-tools2.git ${HOME}/hotspot-tools2 52 | 53 | cat < /run/user/$UID/hotspot-tools.desktop 54 | [Desktop Entry] 55 | Name=Hotspot Tools 56 | GenericName=Tools to Manage AutoHotSpot 57 | Comment=Tools to Manage AutoHotSpot 58 | Exec=/home/`whoami`/hotspot-tools2/hstools 59 | Icon=/home/`whoami`/hotspot-tools2/logo.png 60 | Terminal=false 61 | Type=Application 62 | Categories=HamRadio; 63 | EOF 64 | 65 | sudo cp /run/user/$UID/hotspot-tools.desktop /usr/share/applications/hotspot-tools.desktop 66 | } 67 | 68 | ################################ 69 | # GPS 70 | ################################ 71 | GPS() { 72 | cd ${BUILDDIR} || return 73 | 74 | echo "##########################" 75 | echo "# Installing GPS #" 76 | echo "##########################" 77 | sudo apt install -y python3-gps gpsd-tools gpsd-clients gpsd chrony python3-gi-cairo libgps-dev 78 | sudo mv /etc/default/gpsd /etc/default/gpsd.org 79 | sudo wget https://raw.githubusercontent.com/km4ack/pi-scripts/master/gpsd -P /etc/default/ 80 | CHRONYCHK=$(grep "refclock SHM 0 offset 0.5 delay 0.2 refid NMEA" /etc/chrony/chrony.conf) 81 | if [ -z "$CHRONYCHK" ]; then 82 | echo "refclock SHM 0 offset 0.5 delay 0.2 refid NMEA" | sudo tee -a /etc/chrony/chrony.conf 83 | fi 84 | #line below added per this issue - https://github.com/km4ack/pi-build/issues/146 24SEPT2020 85 | ln -s /lib/systemd/system/gpsd.service /etc/systemd/system/multi-user.target.wants/ 86 | 87 | OLDCODE(){ 88 | #code below built gpsd from source. This is no longer needed with the release of 89 | #bullseye in late 2021. We can now isntall gpsd with apt. 90 | #begin gpsd change 11OCT2021 - see https://github.com/km4ack/pi-build/issues/316 91 | sudo apt-get -y install scons libncurses5-dev python-dev pps-tools chrony python-gi-cairo 92 | sudo ldconfig 93 | cd ${BUILDDIR} 94 | wget http://download.savannah.gnu.org/releases/gpsd/gpsd-3.23.1.tar.gz 95 | tar -xzf gpsd-3.23.1.tar.gz 96 | rm gpsd-3.23.1.tar.gz 97 | cd gpsd-3.23.1/ 98 | scons prefix=/usr --config=force 99 | sudo scons udev-install 100 | sudo ldconfig 101 | sudo scons clean 102 | sudo wget https://raw.githubusercontent.com/km4ack/pi-scripts/master/gpsd -P /etc/default/ 103 | CHRONYCHK=$(grep "refclock SHM 0 offset 0.5 delay 0.2 refid NMEA" /etc/chrony/chrony.conf) 104 | if [ -z "$CHRONYCHK" ]; then 105 | echo "refclock SHM 0 offset 0.5 delay 0.2 refid NMEA" | sudo tee -a /etc/chrony/chrony.conf 106 | fi 107 | #end gpsd change 11OCT2021 108 | } 109 | 110 | #Set GPS by serial ID 111 | #GPS Variable set by main script or update script and placed in config file 112 | if [ "$GPS" != 'NONE' ]; then 113 | sudo sed -i "s|DEVICES.*$|DEVICES=\"$GPS\"|g" /etc/default/gpsd 114 | fi 115 | 116 | #add xgps to menu 117 | cat >xgps.desktop <ardopgui.desktop <>${FILE} 175 | echo "Host=local" >>${FILE} 176 | echo "Port=8515" >>${FILE} 177 | } 178 | 179 | ################################ 180 | # VARA 181 | ################################ 182 | VARA() { 183 | cd ${HOME}/Downloads || return 184 | curl -O https://raw.githubusercontent.com/WheezyE/Winelink/main/install_winelink.sh && bash install_winelink.sh bap 185 | rm ${HOME}/Downloads/install_winelink.sh 186 | } 187 | 188 | 189 | ################################ 190 | # HAMLIB 191 | ################################ 192 | HAMLIB() { 193 | PACKAGE=hamlib 194 | CLEANSOURCE 195 | sudo apt install libusb-1.0-0 libusb-1.0-0-dev 196 | cd ${BUILDDIR} || return 197 | NEWRIG=$(curl -s https://sourceforge.net/projects/hamlib/files/latest/download | 198 | grep -o https://downloads.sourceforge.net/project/hamlib/hamlib/[0-9].[0-9] | 199 | head -n 1 | awk -F "/" '{print $7}') 200 | HAMLIBLINK=https://sourceforge.net/projects/hamlib/files/hamlib/${NEWRIG}/hamlib-${NEWRIG}.tar.gz 201 | echo "###################################" 202 | echo "# Installing Hamlib " 203 | echo "###################################" 204 | wget --tries 2 --connect-timeout=60 ${HAMLIBLINK} 205 | 206 | tar -xzf hamlib-${NEWRIG}.tar.gz 207 | rm hamlib-${NEWRIG}.tar.gz 208 | cd hamlib-${NEWRIG} || return 209 | ./configure 210 | make 211 | sudo make install 212 | sudo ldconfig 213 | sudo make clean 214 | } 215 | 216 | ################################ 217 | # DIREWOLF 218 | ################################ 219 | DIREWOLF() { 220 | cd ${BUILDDIR} || return 221 | git clone https://www.github.com/wb2osz/direwolf 222 | cd ${BUILDDIR}/direwolf || return 223 | mkdir build 224 | cd build 225 | sudo apt-get install -y libasound2-dev cmake libudev-dev 226 | cmake .. 227 | make -j 4 228 | sudo make install 229 | make install-conf 230 | sudo make clean 231 | sed -i "s/N0CALL/${CALL}/" "${HOME}/direwolf.conf" 232 | sed -i 's/# ADEVICE plughw:1,0/ADEVICE plughw:3,0/' ${HOME}/direwolf.conf 233 | sed -i '/#PTT\ \/dev\/ttyUSB0\ RTS/a #Uncomment line below for PTT with CAT through FLRIG\n#PTT RIG 2 localhost:4532' ${HOME}/direwolf.conf 234 | 235 | } 236 | 237 | ################################ 238 | # AX25 239 | ################################ 240 | AX25() { 241 | sudo apt-get install -y ax25-tools 242 | echo "wl2k ${CALL} 1200 255 7 Winlink" | sudo tee -a /etc/ax25/axports 243 | sudo apt-get install -y ax25-apps 244 | } 245 | 246 | ################################ 247 | # PULSE AUDIO Control 248 | ################################ 249 | PULSE() { 250 | sudo apt-get install -y pavucontrol 251 | } 252 | 253 | ################################## 254 | # GPS update tool 255 | ################################## 256 | GPSUPDATE() { 257 | #remove existing file if needed before installing 258 | if [ -f ${HOME}/bin/gpsupdate ]; then 259 | rm ${HOME}/bin/gpsupdate 260 | fi 261 | 262 | cd ${HOME}/bin || return 263 | wget https://raw.githubusercontent.com/km4ack/pi-scripts/master/gpsupdate 264 | chmod +x gpsupdate 265 | 266 | cat >gpsupdate.desktop <.*$//') 45 | XMPKG=$(echo ${FLXM} | sed 's/.tar.gz//') 46 | cd ${BUILDDIR} || return 47 | wget --tries 2 --connect-timeout=60 http://www.w1hkj.com/files/flxmlrpc/${FLXM} 48 | tar -zxvf ${FLXM} 49 | rm ./*.gz #THIS IS DANGEROUS -- SEE SC2035 50 | 51 | #build FLXMLRPC 52 | cd ${XMPKG} || return 53 | ./configure --prefix=/usr/local --enable-static 54 | make 55 | sudo make install 56 | sudo ldconfig 57 | sudo make clean 58 | fi 59 | } 60 | 61 | ################################## 62 | # FLRIG 63 | ################################## 64 | FLRIG() { 65 | #Determine latest FLRIG 66 | RIGTAR=$(curl -s http://www.w1hkj.com/files/flrig/ | grep .tar.gz | sed 's/.*ref="//;s/".*$//') 67 | RIGPKG=$(echo ${RIGTAR} | sed 's/.tar.gz//') 68 | 69 | #Download latest FLRIG 70 | cd ${BUILDDIR} || return 71 | wget --tries 2 --connect-timeout=60 http://www.w1hkj.com/files/flrig/${RIGTAR} 72 | tar -zxvf ${RIGTAR} 73 | rm ./*.gz #THIS IS DANGEROUS -- SEE SC2035 74 | 75 | #Build FLRIG 76 | cd ${RIGPKG} || return 77 | ./configure --prefix=/usr/local --enable-static 78 | make 79 | sudo make install 80 | sudo ldconfig 81 | sudo make clean 82 | sudo apt-mark manual libjpeg9 83 | } 84 | 85 | ################################## 86 | # FLWRAP 87 | ################################## 88 | FLWRAP() { 89 | #Determine latest FLWRAP 90 | WRAPTAR=$(curl -s http://www.w1hkj.com/files/flwrap/ | grep .tar.gz | sed 's/.*ref="//;s/".*$//') 91 | WRAPPKG=$(echo ${WRAPTAR} | sed 's/.tar.gz//') 92 | 93 | #Download latest FLWRAP 94 | cd ${BUILDDIR} || return 95 | wget --tries 2 --connect-timeout=60 http://www.w1hkj.com/files/flwrap/${WRAPTAR} 96 | tar -zxvf ${WRAPTAR} 97 | rm ./*.gz #THIS IS DANGEROUS -- SEE SC2035 98 | 99 | #Build FLRIG 100 | cd ${WRAPPKG} || return 101 | ./configure --prefix=/usr/local --enable-static 102 | make 103 | sudo make install 104 | sudo ldconfig 105 | sudo make clean 106 | } 107 | 108 | ################################## 109 | # FLDIGI 110 | ################################## 111 | FLDIGI() { 112 | #Determine latest FLDIGI 113 | FLTAR=$(curl -s http://www.w1hkj.com/files/fldigi/ | grep .tar.gz | sed 's/.*fldigi/fldigi/;s/.gz.*$/.gz/') 114 | FLPKG=$(echo ${FLTAR} | sed 's/.tar.gz//') 115 | 116 | #Download latest FLDIGI tar file 117 | cd ${BUILDDIR} || return 118 | wget --tries 2 --connect-timeout=60 http://www.w1hkj.com/files/fldigi/${FLTAR} 119 | tar -zxvf ${FLTAR} 120 | rm ./*.gz #THIS IS DANGEROUS -- SEE SC2035 121 | 122 | #build FLDIGI 123 | cd ${FLPKG} || return 124 | ./configure --prefix=/usr/local --enable-static 125 | make 126 | sudo make install 127 | sudo ldconfig 128 | sudo make clean 129 | } 130 | ################################## 131 | # FLMSG 132 | ################################## 133 | FLMSG() { 134 | #Determine latest FLMSG 135 | MSGTAR=$(curl -s http://www.w1hkj.com/files/flmsg/ | grep .tar.gz | sed 's/.*ref="//;s/">.*$//') 136 | MSGPKG=$(echo ${MSGTAR} | sed 's/.tar.gz//') 137 | 138 | #download FLMSG 139 | cd ${BUILDDIR} || return 140 | wget --tries 2 --connect-timeout=60 http://www.w1hkj.com/files/flmsg/${MSGTAR} 141 | tar -zxvf ${MSGTAR} 142 | rm ./*.gz #THIS IS DANGEROUS -- SEE SC2035 143 | 144 | #Build FLMSG 145 | cd ${MSGPKG} || return 146 | ./configure --prefix=/usr/local --enable-static --without-flxmlrpc 147 | make 148 | sudo make install 149 | sudo ldconfig 150 | sudo make clean 151 | } 152 | ################################## 153 | # FLAMP 154 | ################################## 155 | FLAMP() { 156 | #determine latest FLAMP 157 | AMPTAR=$(curl -s http://www.w1hkj.com/files/flamp/ | grep .tar.gz | tail -1 | sed 's/.*ref="//;s/">.*$//') 158 | AMPPKG=$(echo ${AMPTAR} | sed 's/.tar.gz//') 159 | 160 | #download FLAMP 161 | cd ${BUILDDIR} || return 162 | wget --tries 2 --connect-timeout=60 http://www.w1hkj.com/files/flamp/$AMPTAR 163 | tar -zxvf ${AMPTAR} 164 | rm ./*.gz #THIS IS DANGEROUS -- SEE SC2035 165 | 166 | #build FLAMP 167 | cd ${AMPPKG} || return 168 | ./configure --prefix=/usr/local --enable-static 169 | make 170 | sudo make install 171 | sudo ldconfig 172 | sudo make clean 173 | } 174 | ################################## 175 | # FLNET 176 | ################################## 177 | FLNET() { 178 | #determine lastest FLNET 179 | NETTAR=$(curl -s http://www.w1hkj.com/files/flnet/ | grep .tar.gz | sed 's/.*ref="//;s/">.*$//') 180 | NETPKG=$(echo ${NETTAR} | sed 's/.tar.gz//') 181 | 182 | #download FLNET 183 | cd ${BUILDDIR} || return 184 | wget --tries 2 --connect-timeout=60 http://www.w1hkj.com/files/flnet/$NETTAR 185 | tar -zxvf ${NETTAR} 186 | rm ./*.gz #THIS IS DANGEROUS -- SEE SC2035 187 | 188 | #build FLNET 189 | cd ${NETPKG} || return 190 | ./configure --prefix=/usr/local --enable-static 191 | make 192 | sudo make install 193 | sudo ldconfig 194 | sudo make clean 195 | } 196 | ################################## 197 | # RESET SWAP 198 | ################################## 199 | FLSTOP() { 200 | #reset swap size to default 201 | if [ ${FREEMEM} -lt 3000 ]; then 202 | echo "Resetting swap size to default" 203 | #increase swap size 204 | sudo sed -i 's/CONF_SWAPFILE=\/var\/swap/#CONF_SWAPFILE=\/var\/swap/' /etc/dphys-swapfile 205 | sudo sed -i 's/CONF_SWAPSIZE=1024/CONF_SWAPSIZE=100/' /etc/dphys-swapfile 206 | sudo /etc/init.d/dphys-swapfile restart 207 | fi 208 | } 209 | -------------------------------------------------------------------------------- /functions/utility.function: -------------------------------------------------------------------------------- 1 | BUILDDIR=$HOME/.bap-source-files 2 | mkdir -p ${BUILDDIR} 3 | 4 | ################################## 5 | # DIPOLE CALC 6 | ################################## 7 | DIPOLE() { 8 | cd ${HOME}/bin || return 9 | wget --tries 2 --connect-timeout=60 https://raw.githubusercontent.com/km4ack/pi-scripts/master/dipole 10 | chmod +x dipole 11 | 12 | cat >dipole.desktop <getcall.desktop </dev/null; then 56 | sudo apt-get install -y bc 57 | fi 58 | cd ${HOME}/bin || return 59 | wget --tries 2 --connect-timeout=60 https://raw.githubusercontent.com/km4ack/pi-scripts/master/converttemp 60 | chmod +x converttemp 61 | 62 | cat >converttemp.desktop <showlog.desktop < /sys/class/i2c-adapter/i2c-1/new_device" | sudo tee -a /etc/rc.local >/dev/null 2>&1 170 | echo "sudo hwclock -s" | sudo tee -a /etc/rc.local >/dev/null 2>&1 171 | echo "date" | sudo tee -a /etc/rc.local >/dev/null 2>&1 172 | echo "exit 0" | sudo tee -a /etc/rc.local >/dev/null 2>&1 173 | 174 | yad --form --width=500 --text-align=center --center --title="Build-a-Pi" --text-align=center \ 175 | --image ${LOGO} --window-icon=${LOGO} --image-on-top --separator="|" --item-separator="|" \ 176 | --text="Real Time Clock has been installed and configured" \ 177 | --button=gtk-close 178 | fi 179 | 180 | fi #close first if/then statement 181 | } 182 | 183 | ################################## 184 | # PISTATS 185 | ################################## 186 | PISTATS() { 187 | cd ${BUILDDIR} || return 188 | CUR=$(curl http://www.w1hkj.com/PI/pistats.html | grep tgz | sed 's/^.*href="//;s/">.*//') 189 | wget http://www.w1hkj.com/PI/${CUR} 190 | tar -xzvf ${CUR} 191 | rm ${CUR} 192 | PISTATDIR=$(ls ${BUILDDIR} | grep pistats) 193 | cd ${PISTATDIR} || return 194 | sudo apt-get install -y libfltk1.3-dev 195 | make 196 | sudo mv pistats /usr/local/bin 197 | sudo mv ${BUILDDIR}/${PISTATDIR}/data/pistats.desktop /usr/share/applications/ 198 | make clean 199 | cd ${HOME} || return 200 | 201 | } 202 | 203 | ################################## 204 | # TELNET 205 | ################################## 206 | TELNET() { 207 | sudo apt install -y telnet 208 | } 209 | 210 | ################################## 211 | # PiQtTermTCP 212 | ################################## 213 | PITERM() { 214 | cd ${DIR} || return 215 | #determine if 32 or 64 bit and install correct dependencies. Thanks Ben,KU0HN! Reference: https://groups.io/g/bpq32/message/34486 216 | if [ `getconf LONG_BIT` = '32' ]; then 217 | sudo apt install libqt5serialport5 218 | else 219 | sudo dpkg --add-architecture armhf 220 | sudo apt update 221 | sudo apt install -y libqt5widgets5:armhf libqt5serialport5:armhf libasound2:armhf libasound2-plugins:armhf 222 | fi 223 | wget --tries 2 --connect-timeout=60 https://www.cantab.net/users/john.wiseman/Downloads/Beta/piQtTermTCP 224 | sudo chmod +x piQtTermTCP 225 | sudo mv piQtTermTCP /usr/local/bin/ 226 | 227 | cat >piqttermtcp.desktop <secure-file.desktop <ygate.desktop <bpq-config.desktop <${FILE} 362 | LinBPQ was installed during the build. 363 | You will find the config file generator 364 | under accessories in the main pi menu. 365 | NO CONFIGURATION was done for LinBPQ 366 | during the build. Each individual 367 | operator is responsible for configuring 368 | his/her station. 369 | 370 | After completing the config file, you can 371 | start LinBPQ from the command line by running: 372 | ~/linbpq/./linbpq 373 | 374 | Depending on your station setup, you may 375 | need to start rig control, direwolf, or 376 | other applications before running LinBPQ. 377 | 378 | If you need help, you can find 379 | the LinBPQ forums at 380 | https://groups.io/g/bpq32/topics 381 | and the main LinBPQ web page at 382 | http://g8bpq.org.uk 383 | EOF 384 | 385 | } 386 | 387 | ################################## 388 | # Battery Test Script 389 | ################################## 390 | BATT() { 391 | cd ${HOME}/bin || return 392 | wget https://raw.githubusercontent.com/km4ack/pi-scripts/master/batt-test 393 | chmod +x batt-test 394 | 395 | cat >battery-test.desktop <gpsupdate.desktop <${HOME}/Desktop/Block-Microsoft.txt 471 | You have chosen to install the removeMS 472 | script which will block the Pi from accessing 473 | the Microsoft repository. The block has not 474 | been applied yet. To apply the block, open a 475 | terminal window and run the following command: 476 | 477 | removeMS 478 | 479 | You only need to perform the block one time for 480 | each Pi. You can delete the removeMS script 481 | from your system by running: 482 | 483 | rm ~/bin/removeMS 484 | 485 | More information is available in this video 486 | https://youtu.be/I7jLVgnnUW0 487 | EOF 488 | } 489 | 490 | 491 | ################################## 492 | # Packet Search 493 | ################################## 494 | PACKETSEARCH(){ 495 | cd ${HOME}/bin || return 496 | wget --tries 2 --connect-timeout=60 https://raw.githubusercontent.com/km4ack/pi-scripts/master/packetsearch 497 | chmod +x packetsearch 498 | 499 | cat > /run/user/$UID/packetsearch.desktop < /run/user/$UID/qtsoundmodem.desktop <donate.desktop <faq.desktop <support.desktop <FLsuite.directory <vara.directory <bap.directory <hamradio.menu < 199 | 200 | Applications 201 | 202 | Hamradio 203 | HamRadio.directory 204 | 205 | HamRadio 206 | 207 | 208 | FLSUITE 209 | FLsuite.directory 210 | 211 | flsuite 212 | 213 | 214 | 215 | VARA 216 | vara.directory 217 | 218 | vara 219 | 220 | 221 | 222 | 223 | Build-a-Pi 224 | bap.directory 225 | 226 | bap 227 | 228 | 229 | 230 | 231 | 232 | EOF 233 | 234 | sudo mv hamradio.menu /usr/share/extra-xdg-menus/ 235 | } 236 | 237 | #verify ham menu is installed 238 | if [ ! -f /usr/share/extra-xdg-menus/hamradio.menu ]; then 239 | sudo apt install -y extra-xdg-menus 240 | fi 241 | 242 | BAP 243 | 244 | #check to see if this script has already run 245 | REV=$(cat $HOME/.config/KM4ACK | sed 's/MENU=//') 246 | if [ "$MENU" = "$REV" ]; then 247 | echo "menu mods already made" 248 | echo "Revision $REV installed" 249 | exit 250 | else 251 | echo "MENU=$REV" >> $HOME/.config/KM4ACK 252 | CREATEMENU 253 | FLSUITE 254 | VARA 255 | fi 256 | 257 | 258 | 259 | -------------------------------------------------------------------------------- /patch-menu: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | #script to test a patch system for quick fixes in BAP 4 | #KM4ACK 20210805 5 | 6 | MYPATH="$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null 2>&1 && pwd)" 7 | LOGO=${MYPATH}/logo.png 8 | DIR=/run/user/$UID 9 | 10 | TEMP=/run/user/$UID/patch.txt 11 | MENU(){ 12 | ls -I README.md $DIR/pi-build/patch > $TEMP 13 | 14 | INFO=$(PARSER='OFS="\n" {print $1}' 15 | MYTEMP=/run/user/$UID/patch1.txt 16 | tail -10 $TEMP | awk "$PARSER" | \ 17 | yad --title="Build a Pi Patch Tool" --width=500 --height=500 \ 18 | --image $LOGO --window-icon=$LOGO --image-on-top --multiple \ 19 | --center --list --text="Select a Patch to Apply" \ 20 | --column "Patch" \ 21 | --button="Exit":1 \ 22 | --button="Apply Patch":2) 23 | BUT=$? 24 | 25 | 26 | PATCH=$(echo ${INFO} | awk -F "|" '{print $1}') 27 | 28 | #cleanup and exit upon user request 29 | if [ ${BUT} = 1 ] || [ ${BUT} = 252 ];then 30 | echo "cleanup and exit Build a Pi patch tool" 31 | rm -rf $TEMP $DIR/pi-build 32 | #send user back to BAP update tool 33 | ${MYPATH}/update && exit 34 | fi 35 | 36 | 37 | #check to verify that a patch has been selected 38 | #Thank Ken, NB6S for catching this bug! 39 | if [ -z $INFO ]; then 40 | yad --form --width=500 --text-align=center --center --title="Build-a-Pi Patch Tool" --text-align=center \ 41 | --image ${LOGO} --window-icon=${LOGO} --image-on-top --separator="|" --item-separator="|" \ 42 | --text="Please select a patch\rand try again." \ 43 | --button=gtk-close 44 | MENU 45 | fi 46 | 47 | #verify patch has not been applied already 48 | PATCHNAME=$(grep PATCHNAME= $DIR/pi-build/patch/${PATCH} | sed 's/PATCHNAME=//') 49 | PATCHCHECK=$(grep ${PATCHNAME} $HOME/.config/patch) 50 | 51 | if [ -z $PATCHCHECK ]; then 52 | #apply patch & give user notice that patch has been applied 53 | echo "applying $PATCH" 54 | bash ${DIR}/pi-build/patch/${PATCH} 55 | 56 | yad --form --width=500 --text-align=center --center --title="Build-a-Pi Patch Tool" --text-align=center \ 57 | --image ${LOGO} --window-icon=${LOGO} --image-on-top --separator="|" --item-separator="|" \ 58 | --text="${PATCH} patch has been applied" \ 59 | --button=gtk-close 60 | 61 | 62 | 63 | #rm -rf $TEMP $DIR/pi-build 64 | MENU 65 | else 66 | yad --form --width=500 --text-align=center --center --title="Build-a-Pi Patch Tool" --text-align=center \ 67 | --image ${LOGO} --window-icon=${LOGO} --image-on-top --separator="|" --item-separator="|" \ 68 | --text="$PATCH was applied previously\rNo need to apply again." \ 69 | --button=gtk-close 70 | #rm -rf $TEMP $DIR/pi-build 71 | MENU 72 | exit 73 | fi 74 | } 75 | MENU 76 | 77 | -------------------------------------------------------------------------------- /patch/README.md: -------------------------------------------------------------------------------- 1 | # Description 2 | Occasionally small changes (patches) are needed for the Build a Pi code. These changes are usually due to a temporary or minor issue that needs to be addressed but doesn't warrent a full release of BAP. This directory holds those patches. Below you will find a description for each patch that is currently available. If a patch is currently available, the Build a Pi Update Tool will notify you and guide you through installing the patch. 3 | 4 | # test-patch 5 | This patch is for testing purposes only. It will echo "This is a test patch" to the terminal. 6 | 7 | Last Edit 22DEC2021 8 | 9 | PATCH=NO -------------------------------------------------------------------------------- /patch/test-patch: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | #This test-patch script should serve as a 4 | #template for future patch scripts. 5 | #20210805 KM4ACK 6 | 7 | #Give this patch a unique name. A good idea is 8 | #to give it the application name that is being 9 | #patched followed by the date. ie FLDIDI20210805 10 | 11 | PATCHNAME=test-patch20210805 12 | 13 | PATCHFILE=$HOME/.config/patch 14 | touch $PATCHFILE 15 | ############################### 16 | #Patch script commands go here# 17 | ############################### 18 | clear;echo;echo 19 | echo "This is a test patch" 20 | 21 | 22 | ############################################# 23 | #write patch name to a file so we can # 24 | #look and see if it has been applied before.# 25 | #This is checked by the patch-menu script # 26 | #before running the patch # 27 | ############################################# 28 | echo "$PATCHNAME" >> $PATCHFILE 29 | -------------------------------------------------------------------------------- /update: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | ################################################################## 4 | # # 5 | # # # # # # # ##### # # # 6 | # # # # # # # ## # # # # # # 7 | # # # # # # # # # # # # # # 8 | # ## # # ##### ####### # ## # 9 | # # # # # # # # # # # # 10 | # # # # # # # # # # # # 11 | # # # # # # # # ##### # # # 12 | # # 13 | ################################################################## 14 | 15 | MYPATH="$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null 2>&1 && pwd)" 16 | BASE=${MYPATH}/base.txt 17 | FUNCTIONS=${MYPATH}/functions 18 | ADDITIONAL=${MYPATH}/additional.txt 19 | UTILITY=${MYPATH}/utility.txt 20 | FLSUITE=${MYPATH}/flsuite.txt 21 | CONFIG=${MYPATH}/config 22 | LOGO=${MYPATH}/logo.png 23 | TEMPCRON=${MYPATH}/cron.tmp 24 | VERSION=$(grep "version=" ${MYPATH}/changelog | sed 's/version=//') 25 | DATE=$(date) 26 | UPDATEFILE=/run/user/$UID/bapupdate.txt 27 | 28 | FINISH() { 29 | if [ -f "${BASE}" ]; then 30 | rm ${BASE} 31 | fi 32 | 33 | if [ -f "${ADDITIONAL}" ]; then 34 | rm ${ADDITIONAL} 35 | fi 36 | 37 | if [ -f "${FLSUITE}" ]; then 38 | rm ${FLSUITE} 39 | fi 40 | 41 | if [ -f "${UTILITY}" ]; then 42 | rm ${UTILITY} 43 | fi 44 | } 45 | 46 | trap FINISH EXIT 47 | 48 | ##################################### 49 | # Old OS Check 50 | ##################################### 51 | V_ID=$(grep VERSION_ID /etc/os-release | sed 's/VERSION_ID="//;s/"//') 52 | 53 | if [ "$V_ID" -le 10 ]; then 54 | NOTICEPATH=/run/user/$UID 55 | 56 | cat <${NOTICEPATH}/intro.txt 57 | Build a Pi 3.2.0 and later does not support 58 | RaspiOS Buster or earlier versions of RaspiOS. 59 | You should consider upgrading to RaspiOS 11 60 | (Bullseye). By clicking ok you will be moved 61 | to the last version of Build a Pi (3.1.4) that 62 | supports Pi OS Buster. Please note there are 63 | no plans to update Build a Pi for Buster going 64 | forward. In other words, you are on your own 65 | if it is broke and you are still running Pi OS 66 | 10 (Buster). 67 | 68 | EOF 69 | 70 | INTRO=$(yad --width=600 --height=300 --text-align=center --center --title="Out of Date OS Detected!" --show-uri \ 71 | --image ${LOGO} --window-icon=${LOGO} --image-on-top --separator="|" --item-separator="|" \ 72 | --text-info \ 73 | --button="OK":1 <${NOTICEPATH}/intro.txt \ 74 | --button="Exit":2 \ 75 | >/dev/null 2>&1) 76 | BUT=$? 77 | echo $BUT 78 | if [ $BUT = 2 ] || [ $BUT = 252 ]; then 79 | exit 80 | fi 81 | rm ${NOTICEPATH}/intro.txt 82 | cd $HOME/pi-build 83 | git checkout buster 84 | bash build-a-pi & exit 85 | fi 86 | 87 | ##################################### 88 | # end Old OS Check 89 | ##################################### 90 | 91 | #remove temp dir if exist 92 | #fix issue 108 https://github.com/km4ack/pi-build/issues/108 93 | #Thanks to N5RKS for finding the bug 94 | if [ -d ${HOME}/pi-build/temp ]; then 95 | rm -rf "${HOME}/pi-build/temp" 96 | fi 97 | 98 | ##################################### 99 | # Create autostart dir 100 | #used to autostart conky at boot 101 | ##################################### 102 | mkdir -p ${HOME}/.config/autostart 103 | 104 | #Check for BAP updates 105 | #Check for build a pi updates 106 | echo "Checking for Build a Pi updates" 107 | CURRENT=$(head -1 ${MYPATH}/changelog | sed s'/version=//') 108 | 109 | LATEST=$(curl -s https://raw.githubusercontent.com/km4ack/pi-build/master/changelog | tac | tac | head -1 | sed 's/version=//') 110 | 111 | if (($(echo "$LATEST $CURRENT" | awk '{print ($1 > $2)}'))); then 112 | cat <${MYPATH}/updatebap.txt 113 | Build a Pi update available. Current version is $CURRENT and 114 | the lateest version is $LATEST. Would you like to update? 115 | 116 | Change log - https://github.com/km4ack/pi-build/blob/master/changelog 117 | EOF 118 | BAP=$( 119 | yad --width=650 --height=250 --text-align=center --center --title="Build-a-Pi" --show-uri \ 120 | --image ${LOGO} --window-icon=${LOGO} --image-on-top --separator="|" --item-separator="|" \ 121 | --text-info \ 122 | --button="Yes":2 \ 123 | --button="No":3 <${MYPATH}/updatebap.txt 124 | 125 | ) 126 | BUT=$? 127 | echo ${BUT} 128 | ########## 129 | if [ ${BUT} = 252 ]; then 130 | exit 131 | elif [ ${BUT} = 2 ]; then 132 | wget -q --tries=5 --timeout=10 --spider http://google.com #| yad --center --progress --pulsate --timeout-indicator=top --auto-close --no-buttons --text="Checking internet connection" 133 | if [[ $? -eq 1 ]]; then 134 | yad --center --timeout=3 --timeout-indicator=top --no-buttons --text="You are not connected to the internet" 135 | exit 136 | fi 137 | echo "Updating Build a Pi to $LATEST" 138 | mv ${MYPATH}/config ${HOME}/Documents/config.bap 139 | rm -rf "${MYPATH}" 140 | cd ~ || ! echo "Failure" 141 | git clone https://github.com/km4ack/pi-build.git 142 | mv ${HOME}/Documents/config.bap ${MYPATH}/config 143 | 144 | cat <${MYPATH}/updatebap.txt 145 | Build a Pi has been updated to $LATEST. Please restart Build a Pi. 146 | EOF 147 | BAP=$( 148 | yad --width=650 --height=250 --text-align=center --center --title="Build-a-Pi" --show-uri \ 149 | --image ${LOGO} --window-icon=${LOGO} --image-on-top --separator="|" --item-separator="|" \ 150 | --text-info \ 151 | --button="OK":2 <${MYPATH}/updatebap.txt 152 | ) 153 | BUT=$? 154 | exit 0 155 | fi 156 | ########## 157 | fi 158 | rm ${MYPATH}/updatebap.txt >>/dev/null 2>&1 159 | rm ${MYPATH}/complete.txt >>/dev/null 2>&1 160 | clear 161 | 162 | ##################################### 163 | # Patch Check 164 | ##################################### 165 | 166 | #This check first looks at the README.md file to see if the PATCH var is YES. 167 | #If PATCH=YES, then it looks to see if the patches that are available have 168 | #been applied previously. If so, it skips the patch screen. If not, it gives 169 | #the user an option to install the patch(es). 170 | 171 | PATCHCHECK=$(curl -s https://raw.githubusercontent.com/km4ack/pi-build/dev/patch/README.md | grep PATCH= | sed 's/PATCH=//') 172 | 173 | if [ ${PATCHCHECK} = "YES" ]; then 174 | #Setup temp directory for BAP patches and download patches 175 | echo "##########################################################" 176 | echo "#Checking for available patches that haven't been applied#" 177 | echo "##########################################################" 178 | cd /run/user/$UID 179 | git init pi-build 180 | cd pi-build 181 | git remote add -f origin https://github.com/km4ack/pi-build.git 182 | git config core.sparseCheckout true 183 | echo "/patch" >> .git/info/sparse-checkout 184 | git pull origin dev 185 | 186 | FILES=$(ls -I README.md /run/user/$UID/pi-build/patch) 187 | 188 | #check if available patches have already been applied to BAP 189 | for i in $FILES; do 190 | 191 | NAME=$(grep PATCHNAME= /run/user/$UID/pi-build/patch/$i | sed 's/PATCHNAME=//') 192 | RB=$(grep $NAME $HOME/.config/patch) 193 | if [ -z $RB ]; then 194 | echo "$NAME" >> /run/user/$UID/avail-patch.txt 195 | fi 196 | done 197 | #end check 198 | 199 | if [ -f /run/user/$UID/avail-patch.txt ]; then 200 | rm /run/user/$UID/avail-patch.txt 201 | 202 | cat <${MYPATH}/patch.txt 203 | One or more patch scripts are currently 204 | available for Build a Pi. Full description 205 | of each available patch can be found at 206 | https://github.com/km4ack/pi-build/tree/dev/patch 207 | 208 | Would you like to review/apply 209 | available patch scripts? 210 | EOF 211 | 212 | INTRO=$(yad --width=650 --height=300 --text-align=center --center --title="Build-a-Pi Patch Tool" --show-uri \ 213 | --image ${LOGO} --window-icon=${LOGO} --image-on-top --separator="|" --item-separator="|" --text="Build-a-Pi Patch Tool" \ 214 | --text-info \ 215 | --button="Yes":1 \ 216 | --button="No":2 <${MYPATH}/patch.txt \ 217 | >/dev/null 2>&1) 218 | BUT=$? 219 | 220 | if [ ${BUT} = 252 ]; then 221 | echo "Button ${BUT} pressed" 222 | rm ${MYPATH}/patch.txt 223 | rm -rf /run/user/$UID/pi-build 224 | exit 225 | elif [ ${BUT} = 1 ]; then 226 | echo "Button ${BUT} pressed" 227 | rm ${MYPATH}/patch.txt 228 | lxterminal -e bash $HOME/pi-build/patch-menu && exit 229 | elif [ ${BUT} = 2 ]; then 230 | echo "Button ${BUT} pressed" 231 | rm ${MYPATH}/patch.txt 232 | echo "user declined patch updates continuing with Build a Pi update" 233 | rm -rf /run/user/$UID/pi-build 234 | fi 235 | else 236 | rm -rf /run/user/$UID/pi-build 237 | fi 238 | fi 239 | 240 | 241 | 242 | #Scan system for updated applications 243 | yad --width=550 --height=250 --text-align=center --center --title="Update" \ 244 | --image ${LOGO} --window-icon=${LOGO} --image-on-top --separator="|" --item-separator="|" \ 245 | --text="Version $VERSION\r\r\r\rFirst we need to scan the system to see what is installed, \ 246 | then check for updates on the web. This should take less than a minute. Ready when you are." \ 247 | --button="Exit":1 \ 248 | --button="Start Scan":2 249 | BUT=$? 250 | if [ ${BUT} = 252 ] || [ ${BUT} = 1 ]; then 251 | exit 252 | fi 253 | 254 | #install bc if not installed 255 | if ! hash bc >/dev/null; then 256 | sudo apt install -y bc 257 | fi 258 | 259 | 260 | #Run the app check script 261 | bash $MYPATH/app-check 262 | 263 | ##################################### 264 | # Get User Call 265 | ##################################### 266 | CALL() { 267 | source ${MYPATH}/config 268 | INFO=$(yad --form --width=420 --text-align=center --center --title="Build-a-Pi" \ 269 | --image ${LOGO} --window-icon=${LOGO} --image-on-top --separator="|" --item-separator="|" \ 270 | --text="version ${VERSION}" \ 271 | --field="Call Sign*" "${CALL}" \ 272 | --field="* Required":LBL \ 273 | --button="Continue":2) 274 | BUT=$? 275 | if [ ${BUT} = 252 ]; then 276 | exit 277 | fi 278 | } 279 | CALL 280 | CALL=$(echo $INFO | awk -F "|" '{print $1}') 281 | CALL=${CALL^^} 282 | 283 | echo "CALL=${CALL}" >${CONFIG} 284 | 285 | #Verify call not empty 286 | if [ -z "${CALL}" ]; then 287 | yad --form --width=420 --text-align=center --center --title="Build-a-Pi" --text-align=center \ 288 | --image ${LOGO} --window-icon=${LOGO} --image-on-top --separator="|" --item-separator="|" \ 289 | --text="Call Can't be Blank" \ 290 | --button=gtk-ok 291 | CALL 292 | fi 293 | 294 | #----------------------------------------------------# 295 | # BASE APP MENU 296 | #----------------------------------------------------# 297 | source $UPDATEFILE 298 | yad --center --list --checklist --width=600 --height=600 --separator="" \ 299 | --image ${LOGO} --column=Check --column=App --column=status --column=description --print-column=2 \ 300 | --window-icon=${LOGO} --image-on-top --text-align=center \ 301 | --text="Base Apps" --title="Update" \ 302 | false "HAMLIB" "$RIG" "Rig Control" \ 303 | false "HOTSPOT" "$HOTSPOT" "Hot Spot Generator for Portable Ops" \ 304 | false "HSTOOLS" "$HSTOOLS" "Tools to Manage HotSpot" \ 305 | false "GPS" "${GPS}" "GPS Software" \ 306 | false "GPSUPDATE" "${GPSUPDATE}" "Tool to Manage GPS Devices" \ 307 | false "ARDOP" "$ARDOP" "Mode for HF" \ 308 | false "ARDOPGUI" "$ARDOPGUI" "GUI for ARDOP" \ 309 | false "VARA" "$VARA" "VARA Modem - Pi 4 Required" \ 310 | false "DIREWOLF" "$DIRE" "Software TNC" \ 311 | false "AX25" "$AX25" "Data Link Layer Protocol" \ 312 | false "PULSE" "$PULSE" "Sound server" \ 313 | --button="Exit":1 \ 314 | --button="Next":2 >${BASE} 315 | BUT=$? 316 | if [ ${BUT} = 1 ] || [ ${BUT} = 252 ]; then 317 | exit 318 | fi 319 | 320 | #If VARA is chosen, make sure we have a Pi 4 to work with. 321 | #As of 02OCT2022 the VARA installer only works with the Pi 4. 322 | VARA_CHK=$(grep VARA ${BASE}) 323 | if [ -n "$VARA_CHK" ]; then 324 | FREEMEM=$(free -m | grep Mem: | awk '{ print $2 }') 325 | if [ $FREEMEM -lt 1500 ]; then 326 | echo "Not enough memory available" 327 | yad --form --width=500 --text-align=center --center --title="Build-a-Pi" --text-align=center \ 328 | --image ${LOGO} --window-icon=${LOGO} --image-on-top --separator="|" --item-separator="|" \ 329 | --text="Not enough memory\rVARA requires a Pi 4.\r\rVARA will not be installed during the build." \ 330 | --button=gtk-ok 331 | sed -i 's/VARA//;/^$/d' ${BASE} 332 | fi 333 | 334 | fi 335 | 336 | ############################################################# 337 | #check if hotspot is chosen for install & get info if needed# 338 | ############################################################# 339 | HS=$(cat ${BASE} | grep HOTSPOT) 340 | if [ -n "$HS" ]; then 341 | HSINFO() { 342 | #unblock wifi 343 | sudo rfkill unblock all >/dev/null 2>&1 344 | #bring wifi up 345 | sudo ifconfig wlan0 up 346 | #LIST=$(sudo iw dev "wlan0" scan ap-force | egrep "^BSS|SSID:" | grep SSID: | sed 's/SSID://' | awk '{ print $1 }') 347 | #LIST=$(echo $LIST | sed 's/ /|/g') 348 | #Thanks to https://github.com/kuperman for fixing wifi space issue with line below. 349 | LIST=$(sudo iw dev "wlan0" scan ap-force | sed -ne 's/^.*SSID: \(..*\)/\1/p' | sort | uniq | paste -sd '|') 350 | 351 | HSINFO=$(yad --center --form --width=400 --height=400 --separator="|" --item-separator="|" \ 352 | --image ${LOGO} --column=Check --column=App --column=Description \ 353 | --window-icon=${LOGO} --image-on-top --text-align=center \ 354 | --text="HotSpot Information\r\rPlease enter the information\rbelow \ 355 | for the Hot Spot\rNOTE: The last field is the password for the hotspot. You will use this password to \ 356 | connect to your Pi when it is in hotspot mode This password can only contain letters and numbers" \ 357 | --title="Build-a-Pi" \ 358 | --field="Home Wifi SSID":CB "${LIST}" \ 359 | --field="Home Wifi Password":H \ 360 | --field="Hot Spot Password" \ 361 | --button="Exit":1 \ 362 | --button="Continue":2 \ 363 | --button="Refresh Wifi":3) 364 | #} THIS IS WHERE ORIGINAL FUNCTION STOPPED################ 365 | #HSINFO SEE COMMENT PREVIOUS LINE 366 | BUT=$? 367 | if [ ${BUT} = 3 ]; then 368 | HSINFO #Call HSINFO function 369 | fi 370 | 371 | if [ ${BUT} = 252 ] || [ ${BUT} = 1 ]; then 372 | exit 373 | fi 374 | } #THIS IS NEW FUNCTION END FOR TESTING#################### 375 | 376 | HSINFO 377 | fi 378 | SHACKSSID=$(echo $HSINFO | awk -F "|" '{print $1}') 379 | SHACKPASS=$(echo $HSINFO | awk -F "|" '{print $2}') 380 | HSPASS=$(echo $HSINFO | awk -F "|" '{print $3}') 381 | 382 | #Check password length 383 | if [ -n "$HS" ]; then 384 | COUNT=${#HSPASS} 385 | if [ $COUNT -lt 8 ]; then 386 | yad --center --form --width=300 --height=200 --separator="|" \ 387 | --image ${LOGO} --column=Check --column=App --column=Description \ 388 | --window-icon=${LOGO} --image-on-top --text-align=center \ 389 | --text="Hotspot password has to be 8-63 characters" --title="Build-a-Pi" \ 390 | --button=gtk-ok 391 | HSINFO 392 | fi 393 | fi 394 | 395 | echo "SHACKSSID=${SHACKSSID}" >>${CONFIG} 396 | echo "SHACKPASS=${SHACKPASS}" >>${CONFIG} 397 | echo "HSPASS=${HSPASS}" >>${CONFIG} 398 | 399 | ################################### 400 | #CHECK IF GPS IS CHOSEN TO INSTALL# 401 | ################################### 402 | GPSINSTALL=$(cat ${BASE} | grep GPS) 403 | if [ -n "${GPSINSTALL}" ]; then 404 | 405 | yad --center --height="300" --width="300" --form --separator="|" --item-separator="|" --title="GPS" \ 406 | --image ${LOGO} --window-icon=${LOGO} --image-on-top \ 407 | --text="\r\r\r\r\rConnect your GPS to the pi" \ 408 | --button="Exit":1 \ 409 | --button="Continue":2 410 | 411 | BUT=$? 412 | if [ ${BUT} = 1 ] || [ ${BUT} = 252 ]; then 413 | exit 414 | fi 415 | 416 | USB=$(ls /dev/serial/by-id) 417 | USB=$(echo $USB | sed "s/\s/|/g") 418 | 419 | GPS=$(yad --center --height="600" --width="300" --form --separator="|" --item-separator="|" --title="GPS" \ 420 | --image ${LOGO} --window-icon=${LOGO} --image-on-top \ 421 | --text="Choose Your GPS" \ 422 | --field="GPS":CB "$USB") 423 | BUT=$? 424 | if [ ${BUT} = 252 ] || [ ${BUT} = 1 ]; then 425 | echo exiting 426 | exit 427 | fi 428 | 429 | GPS=$(echo ${GPS} | awk -F "|" '{print $1}') 430 | GPS=/dev/serial/by-id/${GPS} 431 | echo "GPS=${GPS}" >>${CONFIG} 432 | fi 433 | 434 | #----------------------------------------------------# 435 | # FLSUITE APP MENU 436 | #----------------------------------------------------# 437 | source $UPDATEFILE 438 | yad --center --list --checklist --width=600 --height=600 --separator="" \ 439 | --image ${LOGO} --column=Check --column=App --column=status --column=description --print-column=2 \ 440 | --window-icon=${LOGO} --image-on-top --text-align=center \ 441 | --text="FLDIGI Suite" --title="Update" \ 442 | false "FLRIG" "${FLRIG}" "Rig Control GUI" \ 443 | false "FLDIGI" "${FLDIGI}" "Digital Software" \ 444 | false "FLAMP" "${FLAMP}" "File Transfer Program" \ 445 | false "FLNET" "${FLNET}" "Net Control Software" \ 446 | false "FLMSG" "${FLMSG}" "Form Manager" \ 447 | false "FLWRAP" "${FLWRAP}" "File Encapsulation" \ 448 | --button="Exit":1 \ 449 | --button="Next":2 >${FLSUITE} 450 | BUT=$? 451 | if [ ${BUT} = 1 ] || [ ${BUT} = 252 ]; then 452 | exit 453 | fi 454 | #----------------------------------------------------# 455 | # HAM APP MENU 456 | #----------------------------------------------------# 457 | source $UPDATEFILE 458 | yad --center --list --checklist --width=600 --height=600 --separator="" \ 459 | --image ${LOGO} --column=Check --column=App --column=status --column=description --print-column=2 \ 460 | --window-icon=${LOGO} --image-on-top --text-align=center \ 461 | --text="HAM Apps" --title="Update" \ 462 | false "PAT" "$PAT" "Radio Email Application" \ 463 | false "PAT-MENU" "$PATMENU" "Control for Pat Winlink" \ 464 | false "CHIRP" "$CHIRP" "Program Radios" \ 465 | false "GARIM" "$GARIM" "File Transfer Program " \ 466 | false "VARIM" "$VARIM" "Radio Chat VARA" \ 467 | false "M0IAX" "$M0IAX" "Tools for JS8Call messages" \ 468 | false "CONKY" "$CONKY" "System Information Display" \ 469 | false "WSJTX" "$FT8" "Weak signal digital mode software" \ 470 | false "JS8CALL" "$JS8" "Weak signal digital mode software" \ 471 | false "REPEAT" "$REPEAT" "Repeater Directory" \ 472 | false "XASTIR" "$XASTIR" "APRS Client" \ 473 | false "YAAC" "$YAAC" "Yet Another APRS Client" \ 474 | false "PI-APRS" "$PIAPRS" "APRS Messaging Client" \ 475 | false "PYQSO" "$PYQSO" "Logging Software" \ 476 | false "HAMRS" "$HAMRS" "Logging Software" \ 477 | false "CQRLOG" "$CQRLOG" "Logging Software" \ 478 | false "QSSTV" "$QSSTV" "Slow scan TV" \ 479 | false "GRIDTRACKER" "$GRIDTRACK" "Track grids in WSJTX" \ 480 | false "HAMCLOCK" "$HAMCLOCK" "Clock for Ham Radio Ops" \ 481 | false "PROPAGATION" "$PROP" "Propagation prediction" \ 482 | false "EES" "$EES" "KM4ACK Emergency Email Server" \ 483 | false "GPREDICT" "$GPREDICT" "Satellite Tracking" \ 484 | false "TQSL" "$TQSL" "LOTW Software" \ 485 | false "GRIDCALC" "$GRIDCALC" "Grid Calculation Software" \ 486 | --button="Exit":1 \ 487 | --button="Next":2 >${ADDITIONAL} 488 | BUT=$? 489 | if [ ${BUT} = 1 ] || [ ${BUT} = 252 ]; then 490 | exit 491 | fi 492 | 493 | #check if hamclock is being installed 494 | HCCHECK=$(cat ${ADDITIONAL} | grep HAMCLOCK) 495 | if [ -n "$HCCHECK" ]; then 496 | 497 | HC=$(yad --form --width=420 --text-align=center --center --title="Build-a-Pi" \ 498 | --image ${LOGO} --window-icon=${LOGO} --image-on-top --separator="|" --item-separator="|" \ 499 | --text="version $VERSION" \ 500 | --field="Ham Clock Size":CB "SMALL|LARGE" \ 501 | --button="Continue":2) 502 | HC=$(echo $HC | awk -F "|" '{print $1}') 503 | sed -i 's/HAMCLOCK//' ${ADDITIONAL} 504 | echo $HC >>${ADDITIONAL} 505 | fi 506 | 507 | 508 | PATCHECK=$(cat ${ADDITIONAL} | grep PAT) 509 | if [ -n "$PATCHECK" ]; then 510 | INFO=$(yad --form --width=420 --text-align=center --center --title="Build-a-Pi" \ 511 | --image ${LOGO} --window-icon=${LOGO} --image-on-top --separator="|" --item-separator="|" \ 512 | --text="version $VERSION" \ 513 | --field="Six Character Grid Square" "$GRID" \ 514 | --field="Winlink Password":H \ 515 | --field="Password is case sensitive":LBL \ 516 | --button="Continue":2) 517 | GRID=$(echo $INFO | awk -F "|" '{print $1}') 518 | GRID=${GRID^^} 519 | WL2KPASS=$(echo $INFO | awk -F "|" '{print $2}') 520 | echo "GRID=$GRID" >>${CONFIG} 521 | echo "WL2KPASS=\"$WL2KPASS\"" >>${CONFIG} 522 | 523 | fi 524 | 525 | #----------------------------------------------------# 526 | # UTILITIES MENU 527 | #----------------------------------------------------# 528 | source $UPDATEFILE 529 | yad --center --list --checklist --width=600 --height=600 --separator="" \ 530 | --image ${LOGO} --column=Check --column=App --column=status --column=description --print-column=2 \ 531 | --window-icon=${LOGO} --image-on-top --text-align=center \ 532 | --text="UTILITIES" --title="Update" \ 533 | false "DIPOLE" "$DIPOLE" "Dipole Calculator" \ 534 | false "PACKETSEARCH" "$PACKETSEARCH" "Winlink Packet Tool" \ 535 | false "CALLSIGN" "${CALLSIGN}" "Call Sign Lookup Utility" \ 536 | false "TEMPCONVERT" "$TEMPCONVERT" "Temperature Converter" \ 537 | false "HDOCS" "$HDOCS" "Reference Materials PDFs" \ 538 | false "GPARTED" "$GPARTED" "Disk Utility Application" \ 539 | false "RTC" "$RTC" "Real Time Clock" \ 540 | false "SHOWLOG" "$SHOWLOG" "Log File Viewer" \ 541 | false "PISTATS" "$PISTATS" "Pi3/4 Stats Monitor" \ 542 | false "TELNET" "$TEL" "Telnet Protocol" \ 543 | false "PITERM" "$PITERM" "PiQTermTCP Terminal Program" \ 544 | false "QTSOUND" "$QTSOUND" "PiQtSoundModem" \ 545 | false "SECURITY" "$SECURITY" "File Encryption Software" \ 546 | false "YGATE" "$YGATE" "Yaesu APRS Software" \ 547 | false "BPQ" "$BPQ" "LinBPQ Software" \ 548 | false "BATT" "$BATT" "Battery Test Script" \ 549 | false "VNC" "$VNC" "VNC Viewer Application" \ 550 | false "XYGRIB" "$XYGRIB" "Grib file viewer" \ 551 | --button="Exit":1 \ 552 | --button="Install/Update Selected":2 >${UTILITY} 553 | BUT=$? 554 | if [ ${BUT} = 1 ] || [ ${BUT} = 252 ]; then 555 | exit 556 | fi 557 | 558 | #check and exit if nothing selected 559 | CKBASE=$(cat ${BASE}) 560 | CKFL=$(cat ${FLSUITE}) 561 | CKADD=$(cat ${ADDITIONAL}) 562 | CKUTIL=$(cat ${UTILITY}) 563 | if [ -z "$CKBASE" ] && [ -z "$CKFL" ] && [ -z "$CKADD" ] && [ -z "$CKUTIL" ]; then 564 | rm ${BASE} ${FLSUITE} ${ADDITIONAL} ${UTILITY} >/dev/null 2>&1 565 | yad --width=550 --height=250 --text-align=center --center --title="Update" \ 566 | --image ${LOGO} --window-icon=${LOGO} --image-on-top --separator="|" --item-separator="|" \ 567 | --text="\r\r\r\rNothing selected for install/update" \ 568 | --button="CLOSE":1 569 | exit 570 | fi 571 | 572 | #backup crontab 573 | crontab -l >${TEMPCRON} 574 | echo "@reboot sleep 10 && export DISPLAY=:0 && ${MYPATH}/.complete" >>${TEMPCRON} 575 | #update/upgrade the system 576 | sudo apt-get -y update 577 | sudo apt-get -y upgrade 578 | sudo apt -y full-upgrade 579 | 580 | #create bap repair tool if it doesn't exist 581 | if [ ! -f /usr/local/bin/repair-bap ]; then 582 | 583 | cat < /run/user/$UID/repair-bap 584 | #!/bin/bash 585 | 586 | if [ ! -f $HOME/pi-build/update ]; then 587 | echo "################################" 588 | echo "# BAP update tool not found. #" 589 | echo "# Repairing, please stand by #" 590 | echo "################################" 591 | cd $HOME 592 | git clone https://github.com/km4ack/pi-build.git || echo "Could not connect to Github. Check your internet and try again" 593 | echo "Repair complete. Run the Build a Pi update tool using the shortcut in the Pi menu" 594 | else 595 | clear;echo;echo 596 | echo "Update tool is present on the system." 597 | fi 598 | EOF 599 | chmod +x /run/user/$UID/repair-bap 600 | sudo mv /run/user/$UID/repair-bap /usr/local/bin/ 601 | 602 | fi 603 | 604 | ##################################### 605 | # Install Base Apps 606 | ##################################### 607 | touch ${HOME}/.config/KM4ACK 608 | echo "UPDATE=\"ran $DATE Version $VERSION\"" >> ${HOME}/.config/KM4ACK 609 | while read i; do 610 | source ${FUNCTIONS}/base.function 611 | $i 612 | done <${BASE} 613 | 614 | ##################################### 615 | # Install FLSUITE 616 | ##################################### 617 | source ${FUNCTIONS}/flsuite.function 618 | #perform memory increase if needed 619 | CHECKFL=$(cat ${MYPATH}/flsuite.txt) 620 | if [ -n "$CHECKFL" ]; then 621 | FLSTART 622 | fi 623 | 624 | touch ${HOME}/.config/KM4ACK 625 | while read i; do 626 | source ${FUNCTIONS}/flsuite.function 627 | $i 628 | done <${FLSUITE} 629 | 630 | source ${FUNCTIONS}/flsuite.function 631 | if [ -n "$CHECKFL" ]; then 632 | FLSTOP 633 | fi 634 | 635 | ##################################### 636 | # Install ADDITIONAL Apps 637 | ##################################### 638 | while read i; do 639 | source ${FUNCTIONS}/additional.function 640 | $i 641 | done <${ADDITIONAL} 642 | 643 | ##################################### 644 | # Install KM4ACK Utilites 645 | ##################################### 646 | while read i; do 647 | source ${FUNCTIONS}/utility.function 648 | $i 649 | done <${UTILITY} 650 | 651 | #create new menu subcategories. One for FLDIGI Suite and 652 | #one for Build a Pi. 653 | bash ${HOME}/pi-build/menu-update 654 | 655 | ##################################### 656 | # END CLEANUP 657 | ##################################### 658 | #Remove temp files 659 | rm ${BASE} ${ADDITIONAL} ${UTILITY} ${FLSUITE} >/dev/null 2>&1 660 | 661 | #remove libham (rigctl) installed from apt 662 | #since it conflicts with hamlib installed from source 663 | sudo apt purge -y libhamlib4 664 | 665 | #restore crontab 666 | crontab ${TEMPCRON} 667 | rm ${TEMPCRON} 668 | 669 | #reboot when done 670 | yad --width=400 --height=200 --title="Reboot" --image ${LOGO} \ 671 | --text-align=center --skip-taskbar --image-on-top \ 672 | --wrap --center --window-icon=${LOGO} \ 673 | --undecorated --text="Update Finished \rReboot Required\r\r" \ 674 | --button="Reboot Now":0 \ 675 | --button="Exit":1 676 | BUT=$(echo $?) 677 | 678 | if [ ${BUT} = 0 ]; then 679 | echo rebooting 680 | sudo reboot 681 | elif [ ${BUT} = 1 ]; then 682 | exit 683 | fi 684 | --------------------------------------------------------------------------------