mirror of
https://github.com/pi-hole/pi-hole.git
synced 2025-04-22 23:30:13 +00:00
don't output "elevating with sudo" in pihole script, just do it.
This commit is contained in:
parent
97a013b2b7
commit
29ad2496b6
3 changed files with 73 additions and 8 deletions
|
@ -10,6 +10,10 @@
|
|||
# the Free Software Foundation, either version 2 of the License, or
|
||||
# (at your option) any later version.
|
||||
|
||||
|
||||
|
||||
|
||||
normalOutput(){
|
||||
piholeVersion=$(cd /etc/.pihole/ && git describe --tags --abbrev=0)
|
||||
webVersion=$(cd /var/www/html/admin/ && git describe --tags --abbrev=0)
|
||||
|
||||
|
@ -17,4 +21,15 @@ piholeVersionLatest=$(curl -s https://api.github.com/repos/pi-hole/pi-hole/relea
|
|||
webVersionLatest=$(curl -s https://api.github.com/repos/pi-hole/AdminLTE/releases/latest | grep -Po '"tag_name":.*?[^\\]",' | perl -pe 's/"tag_name": "//; s/^"//; s/",$//')
|
||||
|
||||
echo "::: Pi-hole version is $piholeVersion (Latest version is $piholeVersionLatest)"
|
||||
echo "::: Web-Admin version is $webVersion (Latest version is $webVersionLatest)"
|
||||
echo "::: Web-Admin version is $webVersion (Latest version is $webVersionLatest)"
|
||||
|
||||
}
|
||||
|
||||
for var in "$@"
|
||||
do
|
||||
case "$var" in
|
||||
"-j" | "--json" ) outputJSON;;
|
||||
"-h" | "--help" ) displayHelp;;
|
||||
* ) normalOutput;;
|
||||
esac
|
||||
done
|
Loading…
Add table
Add a link
Reference in a new issue