Notifiarr / notifiarr

Client for Notifiarr.com
https://notifiarr.com
MIT License
536 stars 31 forks source link

Linux Package Error: discordnotifier-client.postinst: 10: [: Linux: unexpected operator #15

Closed bakerboy448 closed 3 years ago

bakerboy448 commented 3 years ago

Logs: Jan 27 16:48:53 hetz-baker-2004 systemd[1]: Started discordnotifier-client - Unified Client for DiscordNotifier.com. Jan 27 16:48:53 hetz-baker-2004 systemd[1794889]: discordnotifier-client.service: Failed to determine user credentials: No such process Jan 27 16:48:53 hetz-baker-2004 systemd[1794889]: discordnotifier-client.service: Failed at step USER spawning /usr/bin/discordnotifier-client: No such process Jan 27 16:48:53 hetz-baker-2004 systemd[1]: discordnotifier-client.service: Main process exited, code=exited, status=217/USER Jan 27 16:48:53 hetz-baker-2004 systemd[1]: discordnotifier-client.service: Failed with result 'exit-code'.

bakerboy448@hetz-baker-2004:/opt$ sudo wget -qO- https://raw.githubusercontent.com/Go-Lift-TV/discordnotifier-client/main/scripts/install.sh | sudo bash <--------------------------------------------------> ==> Downloading: https://github.com/Go-Lift-TV/discordnotifier-client/releases/download/v0.0.5/discordnotifier-client_0.0.5-24_amd64.deb ==> To Location: /tmp/discordnotifier-client_0.0.5-24_amd64.deb ==> Downloaded. Installing the package! ==> Executing: dpkg --force-confdef --force-confold --install /tmp/discordnotifier-client_0.0.5-24_amd64.deb (Reading database ... 164641 files and directories currently installed.) Preparing to unpack .../discordnotifier-client_0.0.5-24_amd64.deb ... Unpacking discordnotifier-client (0.0.5-24) over (0.0.5-24) ... Setting up discordnotifier-client (0.0.5-24) ... /var/lib/dpkg/info/discordnotifier-client.postinst: 10: [: Linux: unexpected operator /var/lib/dpkg/info/discordnotifier-client.postinst: 14: [: Linux: unexpected operator /var/lib/dpkg/info/discordnotifier-client.postinst: 17: [: Linux: unexpected operator Unknown OS: Linux, this app may not work.

Yet bakerboy448@hetz-baker-2004:/opt$ sudo uname -s Linux

Current Work Around: Run this after install as the postinst fails sudo useradd --system --user-group --no-create-home --home-dir /tmp --shell /bin/false discordnotifier-client

Somehow this is not true https://github.com/Go-Lift-TV/discordnotifier-client/blob/main/scripts/after-install.sh#L10

davidnewhall commented 3 years ago

I broke this when fixing #10. Pretty sure the fix is to remove one of the =. I'll do some more testing on the linux package before the next deploy. For now, add the user manually after installing the package:

sudo useradd --system --user-group --no-create-home --home-dir /tmp --shell /bin/false discordnotifier-client