grafana/pkg/build
MichaIng 71e5024d7a
Packaging: Stop and disable service on DEB package removal (#59580)
* Stop and disable service on DEB package removal

The condition for this code to run applies on package removal only, not on upgrade or reinstall which generally invoke the prerm script as well.

Currently the service keeps running after package removal, failing at some point due to missing files. And if enabled, the attempted service start on every boot is doomed to fail.

If the invoke-rc.d command exists, it can be assumed that update-rc.d exists as well, as both are part of the same init-system-helpers package in dpkg distro repositories.

If neither systemd, nor the init system helper package is installed, the service is not tried to be disabled, since we cannot know a safe method to do so.

Compared to the postinst script, "set -e" is skipped here, since we do not run any command which is allowed to fail the whole package removal.

Signed-off-by: MichaIng <micha@dietpi.com>

* Add postrm script to package build

Signed-off-by: MichaIng <micha@dietpi.com>

* Remove redundant check

Co-authored-by: Dan Cech <dan@aussiedan.com>

---------

Signed-off-by: MichaIng <micha@dietpi.com>
Co-authored-by: Dan Cech <dan@aussiedan.com>
2023-02-21 10:40:38 -05:00
..
cmd CI: Remove variants arg from package step (#62858) 2023-02-06 17:15:42 +02:00
compilers CI: add the grabpl build-backend command into the repo (#52673) 2022-07-28 10:11:22 -04:00
config Chore: Fix goimports order in RelEng packages (#62481) 2023-01-30 15:53:38 +01:00
cryptoutil Handle ioutil deprecations (#53526) 2022-08-10 15:37:51 +02:00
docker Build: Unified dockerfile for all builds (#59173) 2022-11-28 16:18:53 -05:00
droneutil Chore: Fix goimports order in RelEng packages (#62481) 2023-01-30 15:53:38 +01:00
e2eutil CI: move grabpl e2e tests from grabpl to grafana (#53075) 2022-09-02 11:02:10 -04:00
env Chore: Fix goimports order in RelEng packages (#62481) 2023-01-30 15:53:38 +01:00
errutil CI: add the grabpl build-backend command into the repo (#52673) 2022-07-28 10:11:22 -04:00
executil CI: add the grabpl build-backend command into the repo (#52673) 2022-07-28 10:11:22 -04:00
frontend Chore: Fix goimports order in RelEng packages (#62481) 2023-01-30 15:53:38 +01:00
fsutil Chore: Fix goimports order in RelEng packages (#62481) 2023-01-30 15:53:38 +01:00
gcloud Chore: Fix goimports order in RelEng packages (#62481) 2023-01-30 15:53:38 +01:00
git Chore: Fix goimports order in RelEng packages (#62481) 2023-01-30 15:53:38 +01:00
golangutils CI: add the grabpl build-backend command into the repo (#52673) 2022-07-28 10:11:22 -04:00
gpg CI: Move CreateTempFile - use it for rpm/deb packages (#56990) 2022-10-17 16:23:57 +01:00
grafana CI: Replace enterprise check (#62359) 2023-02-01 16:55:49 +00:00
lerna CI: Add artifacts npm commands from grabpl (#61908) 2023-01-23 11:32:51 +01:00
metrics Chore: Fix goimports order in RelEng packages (#62481) 2023-01-30 15:53:38 +01:00
npm CI: Add artifacts npm commands from grabpl (#61908) 2023-01-23 11:32:51 +01:00
packaging Packaging: Stop and disable service on DEB package removal (#59580) 2023-02-21 10:40:38 -05:00
plugins CI: Refactor versions.go (#55238) 2022-09-16 06:26:33 -04:00
stringutil CI: Make the downstream enterprise test a check instead of comments (#59071) 2022-11-24 08:17:12 -06:00
syncutil CI: add the grabpl build-backend command into the repo (#52673) 2022-07-28 10:11:22 -04:00
validation CI: move grabpl package command to pkg/build (#55651) 2022-09-23 11:49:07 -05:00
versions CI: Add artifacts npm commands from grabpl (#61908) 2023-01-23 11:32:51 +01:00
action.go CI: add the grabpl build-backend command into the repo (#52673) 2022-07-28 10:11:22 -04:00
cmd.go build: fix corss build (#61121) 2023-02-10 07:42:29 -06:00
docs.go Chore: move build command to importable package (#38726) 2021-09-03 11:24:21 -05:00
exec.go Chore: move build command to importable package (#38726) 2021-09-03 11:24:21 -05:00
fs.go Add nolint to two lines in fs.go (#49357) 2022-05-21 12:14:58 +02:00
git.go Chore: move build command to importable package (#38726) 2021-09-03 11:24:21 -05:00
opts.go Chore: move build command to importable package (#38726) 2021-09-03 11:24:21 -05:00
version.go Chore: Use strings.ReplaceAll and preallocate containers (#58483) 2022-11-09 17:17:09 +01:00