Some checks failed
Pipeline: Test, Lint, Build / Get version info (push) Has been cancelled
Pipeline: Test, Lint, Build / Lint Go code (push) Has been cancelled
Pipeline: Test, Lint, Build / Test Go code (push) Has been cancelled
Pipeline: Test, Lint, Build / Test JS code (push) Has been cancelled
Pipeline: Test, Lint, Build / Lint i18n files (push) Has been cancelled
Pipeline: Test, Lint, Build / Check Docker configuration (push) Has been cancelled
Pipeline: Test, Lint, Build / Build (darwin/amd64) (push) Has been cancelled
Pipeline: Test, Lint, Build / Build (darwin/arm64) (push) Has been cancelled
Pipeline: Test, Lint, Build / Build (linux/386) (push) Has been cancelled
Pipeline: Test, Lint, Build / Build (linux/amd64) (push) Has been cancelled
Pipeline: Test, Lint, Build / Build (linux/arm/v5) (push) Has been cancelled
Pipeline: Test, Lint, Build / Build (linux/arm/v6) (push) Has been cancelled
Pipeline: Test, Lint, Build / Build (linux/arm/v7) (push) Has been cancelled
Pipeline: Test, Lint, Build / Build (linux/arm64) (push) Has been cancelled
Pipeline: Test, Lint, Build / Build (windows/386) (push) Has been cancelled
Pipeline: Test, Lint, Build / Build (windows/amd64) (push) Has been cancelled
Pipeline: Test, Lint, Build / Push to GHCR (push) Has been cancelled
Pipeline: Test, Lint, Build / Push to Docker Hub (push) Has been cancelled
Pipeline: Test, Lint, Build / Cleanup digest artifacts (push) Has been cancelled
Pipeline: Test, Lint, Build / Build Windows installers (push) Has been cancelled
Pipeline: Test, Lint, Build / Package/Release (push) Has been cancelled
Pipeline: Test, Lint, Build / Upload Linux PKG (push) Has been cancelled
Close stale issues and PRs / stale (push) Has been cancelled
POEditor import / update-translations (push) Has been cancelled
31 lines
825 B
Bash
31 lines
825 B
Bash
#!/bin/sh
|
|
|
|
action=$1
|
|
|
|
remove() {
|
|
postinstall_flag="/var/lib/navidrome/.installed"
|
|
|
|
if [ -f "$postinstall_flag" ]; then
|
|
# If this fails, ignore it
|
|
navidrome service uninstall || :
|
|
rm "$postinstall_flag"
|
|
|
|
printf "The following may still be present (especially if you have not done a purge):\n"
|
|
printf "1. /etc/navidrome/navidrome.toml (configuration file)\n"
|
|
printf "2. /var/lib/navidrome (database/cache)\n"
|
|
printf "3. /opt/navidrome (default location for music)\n"
|
|
printf "4. The Navidrome user (user name navidrome)\n"
|
|
fi
|
|
}
|
|
|
|
case "$action" in
|
|
"1" | "upgrade")
|
|
# For an upgrade, do nothing
|
|
# Leave the service file untouched
|
|
# This is relevant for RPM/DEB-based installs
|
|
;;
|
|
*)
|
|
remove
|
|
;;
|
|
esac
|