mirror of
https://github.com/pi-hole/pi-hole.git
synced 2024-11-15 10:43:55 +00:00
Don't try to obtain version of web interface it it is not installed. Fixes #1303
This commit is contained in:
parent
ae9182c92e
commit
6dea00668e
1 changed files with 13 additions and 7 deletions
|
@ -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))"
|
||||||
echo "::: Web-Admin version is $(getLocalVersion "${WEBGITDIR}") (Latest version is $(getRemoteVersion AdminLTE))"
|
if [ -d "${WEBGITDIR}" ]; then
|
||||||
|
echo "::: Web-Admin version is $(getLocalVersion "${WEBGITDIR}") (Latest version is $(getRemoteVersion AdminLTE))"
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
webOutput() {
|
webOutput() {
|
||||||
case "${1}" in
|
if [ -d "${WEBGITDIR}" ]; then
|
||||||
"-l" | "--latest" ) echo $(getRemoteVersion AdminLTE);;
|
case "${1}" in
|
||||||
"-c" | "--current" ) echo $(getLocalVersion "${WEBGITDIR}");;
|
"-l" | "--latest" ) echo $(getRemoteVersion AdminLTE);;
|
||||||
"-h" | "--hash" ) echo $(getLocalHash "${WEBGITDIR}");;
|
"-c" | "--current" ) echo $(getLocalVersion "${WEBGITDIR}");;
|
||||||
* ) echo "::: Invalid Option!"; exit 1;
|
"-h" | "--hash" ) echo $(getLocalHash "${WEBGITDIR}");;
|
||||||
esac
|
* ) echo "::: Invalid Option!"; exit 1;
|
||||||
|
esac
|
||||||
|
else
|
||||||
|
echo "::: Web interface not installed!"; exit 1;
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
coreOutput() {
|
coreOutput() {
|
||||||
|
|
Loading…
Reference in a new issue