Skip to content

Commit

Permalink
udpate cli
Browse files Browse the repository at this point in the history
  • Loading branch information
root committed Jun 8, 2023
1 parent 50db704 commit 43dfccf
Showing 1 changed file with 24 additions and 17 deletions.
41 changes: 24 additions & 17 deletions communitygarden-cli
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ clean () {

install_essential () {
apt install python3-configobj python3-pil python3-serial python3-usb python3-pip
apt install network-manager
}

install_weewx_dependency () {
Expand All @@ -28,24 +29,26 @@ wifi_check () {
}

install_wifi_private () {
echo >>
network={
local username=${1}
local password=${2}

cat << EOF > /etc/wpa_supplicant/wpa_supplicant.conf
network={
ssid="eduroam"
scan_ssid=1
key_mgmt=WPA-EAP
eap=PEAP
identity="*****@*****.edu"
anonymous_identity="*****@*****.edu"
password="*****"
identity="$username@cpp.edu"
# anonymous_identity="*****@cpp.edu"
password="$password"
ca_cert="/usr/share/ca-certificates/eduroam.pem"
phase1="peaplabel=auto peapver=auto"
phase2="auth=MSCHAPV2"
}
<
wpa_cli -i wlan0 reconfigure
}
EOF
wpa_cli -i wlan0 -c /etc/wpa_supplicant/wpa_supplicant.conf
}


install_weewix () {
apt-get update
apt-get install weewx
Expand All @@ -55,29 +58,33 @@ install_database () {
# Required if you are using MySQL (MariaDB):
apt install mariadb-client python3-mysqldb
}
install_iot () {

}

install_mqtt () {

}

## Main ##

main () {
while [ -n "$1" ]
do
case "$1" in
;;
--install-dependency )
install_dependency
shift
;;
--install-weewx )
download_weewx
shift
;;

--install-weewx )
download_weewx
shift
;;

--version | -v)
echo '1.0'
shift
;;
* | -*)
* | -*)
echo 'Invalid argument'
help
exit 1
Expand Down

0 comments on commit 43dfccf

Please sign in to comment.