scripts

random scripts
git clone https://git.parazyd.org/scripts
Log | Files | Refs

wifi2qr (340B)


      1 #!/bin/sh
      2 
      3 usage() {
      4 	printf "usage: %s [essid] [passphrase]\\n" "$(basename $0)"
      5 	exit 1
      6 }
      7 
      8 test -n "$1" || usage
      9 
     10 test -n "$2" || {
     11 	qrencode -s 13 -o qr-wifi.png "WIFI:S:${1};T:nopass;;"
     12 	printf "qr saved to qr-wifi.png\\n"
     13 	exit 0
     14 }
     15 
     16 qrencode -s 13 -o qr-wifi.png "WIFI:S:${1};T:WPA;P:${2};;"
     17 printf "qr saved to qr-wifi.png\\n"
     18 exit 0