# # Created by Chuck GElm NC8Q # Last edit on March 24, 2022 # # This file, 'install-asterisk.sh', and its companion 'files.txt' are to be SCP'ed to the GL-iNet device. # # Enable the mounting of USB thumb-drive. # # https://openwrt.org/docs/guide-user/storage/usb-drives-quickstart # opkg update opkg update && opkg install block-mount e2fsprogs kmod-fs-ext4 kmod-usb-storage kmod-usb2 kmod-usb3 # # Configure /dev/sda1 to auto mount as /mnt/usb # https://openwrt.org/docs/guide-user/storage/usb-drives-quickstart # mkdir /mnt/usb mount /dev/sda1 /mnt/usb block detect | uci import fstab uci set fstab.@mount[0].enabled='1' && uci set fstab.@global[0].anon_mount='1' && uci commit fstab /etc/init.d/fstab boot # # The GL-iNet device will now auto-mount /dev/sda1 upon each boot. # # AREDN does not install 'ssl' packages to enable 'wget https:', so let us install them. # opkg install libopenssl1.1_1.1.1m-1_mips_24kc.ipk libopenssl-conf_1.1.1m-1_mips_24kc.ipk openssl-util_1.1.1m-1_mips_24kc.ipk # # 'wget https:' is now enabled. # # wget ASTERISK16, IAX, and PJSIP and their 30 pre-requisits. # BASE="https://downloads.openwrt.org/releases/19.07.8/packages/mips_24kc/" IFS="," #echo "$BASE" while read -r LINE; do #echo "LINE $LINE" FOLDER=$(echo "$LINE" | awk -F',' '{print $1}') FILE=$(echo "$LINE" | awk -F',' '{print $2}') #echo "FOLDER $FOLDER" #echo "$FILE FILE" echo "Shall I get $FILE from $BASE$FOLDER" if [ ! -f $FILE ]; then sleep 1 echo "Yes, wget $BASE$FOLDER$FILE" sleep 1 wget $BASE$FOLDER$FILE else echo "No, the file $FILE already exists." fi du -sh /mnt/usb opkg install $FILE du -sh /mnt/usb echo "" sleep 1 done < files.txt # # 'files.txt' contains ASTERISK16, IAX, and PJSIP and their 30 pre-requisits. #