pkgbuilds/grafana/grafana.install

23 lines
742 B
Plaintext
Raw Normal View History

2024-04-12 07:21:50 -06:00
#/bin/sh
# arg 1: the new package version
# arg 2: the old package version
post_upgrade() {
if (( "$(vercmp $2 2.6.0-3)" < 0 )); then
echo '==> Configuration moved to /etc/grafana.ini'
fi
if (( "$(vercmp $2 4.4.3-1)" < 0 )); then
echo '==> Grafana now uses static UID/GID 207'
echo '==> Trying to update your previous UID/GID'
if ! { usermod -u 207 grafana && groupmod -g 207 grafana &&
chown -R 207:207 /var/{lib,log}/grafana; }; then
echo '==> Automatic GID/UID change failed. Do it manually!'
echo '==> usermod -g 207 grafana && groupmod -u 207 grafana && chown -R 207:207 /var/l{ib,og}/grafana'
fi
echo '==> Check the ownership of your files!'
fi
return 0
}
# vim:set ts=2 sw=2 et: