grafana/pkg
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
..
api Authn: Anon session service (#63052) 2023-02-21 16:21:18 +01:00
build Packaging: Stop and disable service on DEB package removal (#59580) 2023-02-21 10:40:38 -05:00
bus Chore: Fix goimports grouping in other backend platform packages (#62422) 2023-01-30 08:26:42 +00:00
cmd Support bundles: Refactor registry into separate service (#62945) 2023-02-06 17:50:03 +01:00
codegen Chore: Update oapi-codegen library (#62962) 2023-02-21 12:34:24 +01:00
components Loki: Push support for multi-tenancy mode (#60866) 2023-01-23 16:24:22 +01:00
cuectx kindsys: Fix CUE code generation on Windows (#62812) 2023-02-02 15:06:55 -05:00
events Alerting: Update rules version when folder title is updated (#53013) 2022-08-01 19:28:38 -04:00
expr Chore: Rename Id to ID in alerting models (#62777) 2023-02-02 17:22:43 +01:00
extensions Update dskit to the latest main (#62616) 2023-01-31 19:05:49 +00:00
ifaces/gcsifaces Chore: Upgrade Go to 1.19.1 (#54902) 2022-09-12 12:03:49 +02:00
infra Authn: Anon session service (#63052) 2023-02-21 16:21:18 +01:00
kinds Chore: Update oapi-codegen library (#62962) 2023-02-21 12:34:24 +01:00
kindsys Chore: Set up codeowner file for dataviz squad (#63200) 2023-02-09 21:02:41 +01:00
login LDAP: Move LDAP globals to Config (#63255) 2023-02-10 19:01:55 +01:00
middleware Authn: Anon session service (#63052) 2023-02-21 16:21:18 +01:00
mocks/mock_gcsifaces Chore: Fix goimports grouping in other backend platform packages (#62422) 2023-01-30 08:26:42 +00:00
models Chore: Move library elements models to library elements service (#62507) 2023-02-01 17:32:05 +01:00
plugins Chore: Update oapi-codegen library (#62962) 2023-02-21 12:34:24 +01:00
registry Schemas: Generate CRDs for core kinds (#62641) 2023-02-01 09:08:26 -08:00
server Authn: Anon session service (#63052) 2023-02-21 16:21:18 +01:00
services Authn: Anon session service (#63052) 2023-02-21 16:21:18 +01:00
setting Cookies: Provide a mechanism for per user control over cookies (#61566) 2023-02-21 11:19:07 +01:00
tests Chore: Remove Result field from datasources (#63048) 2023-02-09 15:49:44 +01:00
tsdb Backend: Use latest plugin-sdk-go v0.149.1 (#63498) 2023-02-21 09:06:15 -05:00
util Chore: Replace short UID generation with more standard UUIDs (#62731) 2023-02-06 20:44:37 -05:00
web Chore: Fix goimports grouping (#62423) 2023-01-30 08:25:58 +00:00
README.md Chore: Move all backend contribution documents to a single directory (#61140) 2023-01-11 11:16:52 +01:00
ruleguard.rules.go Chore: update all +build statements (#38782) 2021-09-01 17:38:56 +03:00

This directory contains the code for the Grafana backend.

The contributor documentation for Grafana's backend is in /contribute/backend/README.md.