mirror of
https://github.com/VictoriaMetrics/VictoriaMetrics.git
synced 2024-11-21 14:44:00 +00:00
deb packaging fixes: 1) stop the service in prerm 2) reload services in postrm (#123)
This commit is contained in:
parent
915fb6df79
commit
d1132bb188
3 changed files with 13 additions and 3 deletions
|
@ -0,0 +1,5 @@
|
||||||
|
#!/bin/sh
|
||||||
|
set -e
|
||||||
|
|
||||||
|
# Reload systemd unit
|
||||||
|
systemctl daemon-reload
|
5
package/deb/prerm
Normal file
5
package/deb/prerm
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
#!/bin/sh
|
||||||
|
set -e
|
||||||
|
|
||||||
|
# Reload systemd unit
|
||||||
|
systemctl stop victoria-metrics
|
|
@ -46,7 +46,6 @@ echo "*** Out .deb : ${OUT_DEB}"
|
||||||
# Copy the binary
|
# Copy the binary
|
||||||
|
|
||||||
cp "./bin/${EXENAME_SRC}" "${TEMPDIR}/usr/sbin/${EXENAME_DST}"
|
cp "./bin/${EXENAME_SRC}" "${TEMPDIR}/usr/sbin/${EXENAME_DST}"
|
||||||
file "${TEMPDIR}/usr/sbin/${EXENAME_DST}"
|
|
||||||
|
|
||||||
# Copy supporting files
|
# Copy supporting files
|
||||||
|
|
||||||
|
@ -70,6 +69,7 @@ cp "${PACKDIR}/deb/conffile" "${TEMPDIR}/conffile"
|
||||||
# Copy postinst and postrm
|
# Copy postinst and postrm
|
||||||
|
|
||||||
cp "${PACKDIR}/deb/postinst" "${TEMPDIR}/postinst"
|
cp "${PACKDIR}/deb/postinst" "${TEMPDIR}/postinst"
|
||||||
|
cp "${PACKDIR}/deb/prerm" "${TEMPDIR}/prerm"
|
||||||
cp "${PACKDIR}/deb/postrm" "${TEMPDIR}/postrm"
|
cp "${PACKDIR}/deb/postrm" "${TEMPDIR}/postrm"
|
||||||
|
|
||||||
(
|
(
|
||||||
|
@ -84,8 +84,8 @@ cp "${PACKDIR}/deb/postrm" "${TEMPDIR}/postrm"
|
||||||
# Archive control
|
# Archive control
|
||||||
|
|
||||||
chmod 644 control md5sums
|
chmod 644 control md5sums
|
||||||
chmod 755 postrm postinst
|
chmod 755 postinst postrm prerm
|
||||||
fakeroot -- tar -c --xz -f ./control.tar.xz ./control ./md5sums ./postinst ./postrm
|
fakeroot -- tar -c --xz -f ./control.tar.xz ./control ./md5sums ./postinst ./prerm ./postrm
|
||||||
|
|
||||||
# Archive data
|
# Archive data
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue