1
0
mirror of https://github.com/pi-hole/pi-hole synced 2024-12-22 23:08:07 +00:00

Merge pull request #1307 from pi-hole/fix/versionwithoutwebinterface

Don't try to obtain version of web interface it it is not installed
This commit is contained in:
DL6ER 2017-03-07 23:54:32 +01:00 committed by GitHub
commit e0e9ebbe74

View File

@ -81,16 +81,22 @@ getRemoteVersion(){
normalOutput() { normalOutput() {
echo "::: Pi-hole version is $(getLocalVersion "${PHGITDIR}") (Latest version is $(getRemoteVersion pi-hole))" echo "::: Pi-hole version is $(getLocalVersion "${PHGITDIR}") (Latest version is $(getRemoteVersion pi-hole))"
if [ -d "${WEBGITDIR}" ]; then
echo "::: Web-Admin version is $(getLocalVersion "${WEBGITDIR}") (Latest version is $(getRemoteVersion AdminLTE))" echo "::: Web-Admin version is $(getLocalVersion "${WEBGITDIR}") (Latest version is $(getRemoteVersion AdminLTE))"
fi
} }
webOutput() { webOutput() {
if [ -d "${WEBGITDIR}" ]; then
case "${1}" in case "${1}" in
"-l" | "--latest" ) echo $(getRemoteVersion AdminLTE);; "-l" | "--latest" ) echo $(getRemoteVersion AdminLTE);;
"-c" | "--current" ) echo $(getLocalVersion "${WEBGITDIR}");; "-c" | "--current" ) echo $(getLocalVersion "${WEBGITDIR}");;
"-h" | "--hash" ) echo $(getLocalHash "${WEBGITDIR}");; "-h" | "--hash" ) echo $(getLocalHash "${WEBGITDIR}");;
* ) echo "::: Invalid Option!"; exit 1; * ) echo "::: Invalid Option!"; exit 1;
esac esac
else
echo "::: Web interface not installed!"; exit 1;
fi
} }
coreOutput() { coreOutput() {