Looks like your installer script is somehow broken as an official release file of course does not contain a syntax error. Team members with access to your debug token can derive it, but until then: Which version of Pi-hole are you running? pihole -v
Since pihole -r will not work for the same reason, you need to download the intact file manually, but at best it should fit your version, hence I'm asking .
pi@pihole:~$ pihole -v
Pi-hole version is v4.4 (Latest: v5.0)
AdminLTE version is v4.3.3 (Latest: v5.0)
FTL version is v4.3.1 (Latest: v5.0)
pi@pihole:~$ pihole -r
/etc/.pihole/automated install/basic-install.sh: line 904: syntax error near unexpected token `then'
pi@pihole:~$
Okay, the following should fix it, as long as the installer is the only broken file:
mv '/etc/.pihole/automated install/basic-install.sh'{,_bak} # Backup just in case someone wants to have a closer look
wget https://raw.githubusercontent.com/pi-hole/pi-hole/release/v4.4/automated%20install/basic-install.sh -O '/etc/.pihole/automated install/basic-install.sh'
pihole -up
pi@pihole:~$ pihole -up
[i] Checking for updates...
[i] Pi-hole Core: update available
error: inflate: data stream error (invalid literal/lengths set)
error: unable to unpack 4f824bec7845c75c60b957f8b44d598d2e2efcc7 header
error: inflate: data stream error (invalid literal/lengths set)
error: unable to unpack 4f824bec7845c75c60b957f8b44d598d2e2efcc7 header
fatal: loose object 4f824bec7845c75c60b957f8b44d598d2e2efcc7 (stored in .git/objects/4f/824bec7845c75c60b957f8b44d598d2e2efcc7) is corrupt
fatal: the remote end hung up unexpectedly
warning: ignoring broken ref refs/remotes/origin/master
warning: ignoring broken ref refs/remotes/origin/master
fatal: ambiguous argument '@{upstream}': unknown revision or path not in the working tree.
Use '--' to separate paths from revisions, like this:
'git [...] -- [...]'
[i] Web Interface: update available
[i] FTL: update available
[i] Pi-hole core files out of date, updating local repo.
[✓] Check for existing repository in /etc/.pihole
[i] Update repo in /etc/.pihole...
: Could not update local repository. Contact support.
@DanSchaper
Jep your right, cleaner also since other file could be broken as well. Still git noob here, how do you repair a local repository, at best by pulling the exact same commit state that it is based on?
pi@pihole:~$ pihole -up
[i] Checking for updates...
[i] Pi-hole Core: up to date
error: inflate: data stream error (invalid literal/lengths set)
error: unable to unpack 4f824bec7845c75c60b957f8b44d598d2e2efcc7 header
error: inflate: data stream error (invalid literal/lengths set)
error: unable to unpack 4f824bec7845c75c60b957f8b44d598d2e2efcc7 header
fatal: loose object 4f824bec7845c75c60b957f8b44d598d2e2efcc7 (stored in .git/objects/4f/824bec7845c75c60b957f8b44d598d2e2efcc7) is corrupt
fatal: the remote end hung up unexpectedly
warning: ignoring broken ref refs/remotes/origin/master
warning: ignoring broken ref refs/remotes/origin/master
fatal: ambiguous argument '@{upstream}': unknown revision or path not in the working tree.
Use '--' to separate paths from revisions, like this:
'git [...] -- [...]'
[i] Web Interface: update available
[i] FTL: up to date
[i] Pi-hole Web Admin files out of date, updating local repo.
[✓] Check for existing repository in /var/www/html/admin
[i] Update repo in /var/www/html/admin...
: Could not update local repository. Contact support.
pi@pihole:~$