One of my pet hates is having to use module admin to update the Freepbx modules via the GUI. Its not a big deal but as we use SSH to connect to servers and then tunnels to connect to the GUI. Which is all fine unless you have multiple SSH sessions open and things get complicated..
So I have written a small “dirty” Bash script to prompt you through the fwconsole method of updating all or just one module of your choice.
#!/bin/bash echo ssh freepbx update tool. 2016 cyber-cottage.eu echo "Welcome" echo "We will check for upgrades" read -p "Do You want to check upgrade status of freepbx modules? (y/n) " RESP if [ "$RESP" = "y" ]; then echo "Glad to hear it" fwconsole ma showupgrades else exit fi echo "We will now apply all upgrades" read -p "Do You want to upgrade all freepbx modules? (y/n) " RESP if [ "$RESP" = "y" ]; then echo "Glad to hear it" fwconsole ma upgradeall else echo "OK We will just upgrade the module you choose" read -p "Please enter the name of the module you want to upgrade " MODU echo "We Will Now Upgrade $MODU" fwconsole ma upgrade $MODU fi read -p "Do You want to update permissions? (y/n) " RESP if [ "$RESP" = "y" ]; then echo "Glad to hear it" fwconsole chown else echo "Dont forget to apply changes on GUI then" fi read -p "Do You want to apply the changes? (y/n) " RESP if [ "$RESP" = "y" ]; then echo "Glad to hear it" fwconsole reload else echo "Dont forget to apply changes on GUI then" exit fi
As I said it was quick and “dirty” but it does work and can save a bit of time.