Github updated api and now appends a semicolon to versions, added `tr -d :` to list for url filtering elkarbackupALP: * Github api Fix duplicati: * Github api fix * Enabled in jenkinsfile OmadaV3: * Added Stop command for omada after installation to avoid DB corruption * Moved automaticaly installed dependencies to package list transfersh: * Github api fix hass: * Added Missing python modules (sqlalchemy nvhash) mailbackup: * Github api fix * Moved downlading of resources to project pihole: *Added support for ProxmoxHelper App updater
20 lines
812 B
Bash
20 lines
812 B
Bash
#!/bin/bash
|
|
|
|
NewPhpMyAdminVersion=$(curl -s https://api.github.com/repos/phpmyadmin/phpmyadmin/releases/latest | grep 'tag_name.*' | cut -d : -f 2,3 | tr -d \" |tr -d , |tr -d " " |tr -d : )
|
|
|
|
if test "$NewPhpMyAdminVersion" = "$(cat /opt/phpmyadmin-installed)" ; then
|
|
echo 'PhpMyAdmin up-to-date'
|
|
exit
|
|
else
|
|
echo 'Updating PhpMyAdmin'
|
|
service phpmyadmin stop
|
|
mv /opt/PhpMyAdmin/config.inc.php /tmp/phpmyadmin.config
|
|
curl --retry 7 --retry-delay 5 -s -L https://www.phpmyadmin.net/downloads/phpMyAdmin-latest-english.tar.gz -o /tmp/phpmya.tar.gz
|
|
tar -C /opt/PhpMyAdmin -xzf /tmp/phpmya.tar.gz --strip 1
|
|
rm -rf /tmp/phpmya.tar.gz
|
|
mv /tmp/phpmyadmin.config /opt/PhpMyAdmin/config.inc.php
|
|
echo $NewPhpMyAdminVersion > /opt/phpmyadmin-installed
|
|
service phpmyadmin start
|
|
fi
|
|
|