diff --git a/package/package_deb.sh b/package/package_deb.sh index 34e8fe46b..cc647ec1a 100755 --- a/package/package_deb.sh +++ b/package/package_deb.sh @@ -33,7 +33,7 @@ BUILD=`cat ${PACKDIR}/VAR_BUILD | perl -ne 'chomp and print'` mkdir -p "${TEMPDIR}" && echo "*** Created : ${TEMPDIR}" -mkdir -p "${TEMPDIR}/usr/local/bin/" +mkdir -p "${TEMPDIR}/usr/bin/" mkdir -p "${TEMPDIR}/lib/systemd/system/" echo "*** Version : ${VERSION}-${BUILD}" @@ -45,7 +45,7 @@ echo "*** Out .deb : ${OUT_DEB}" # Copy the binary -cp "./bin/${EXENAME_SRC}" "${TEMPDIR}/usr/local/bin/${EXENAME_DST}" +cp "./bin/${EXENAME_SRC}" "${TEMPDIR}/usr/bin/${EXENAME_DST}" # Copy supporting files diff --git a/package/package_rpm.sh b/package/package_rpm.sh index 5b62e3af6..bc461681b 100755 --- a/package/package_rpm.sh +++ b/package/package_rpm.sh @@ -62,11 +62,11 @@ Requires: libc VictoriaMetrics is fast, cost-effective and scalable time series database. It can be used as a long-term remote storage for Prometheus. %files -%attr(0744, root, root) /usr/local/bin/* +%attr(0744, root, root) /usr/bin/* %attr(0644, root, root) /lib/systemd/system/* %prep -mkdir -p \$RPM_BUILD_ROOT/usr/local/bin/ +mkdir -p \$RPM_BUILD_ROOT/usr/bin/ mkdir -p \$RPM_BUILD_ROOT/lib/systemd/system/ cp ${PWD}/bin/${EXENAME_SRC} \$RPM_BUILD_ROOT/usr/local/bin/${EXENAME_DST} diff --git a/package/rpm/victoriametrics-rpm.spec b/package/rpm/victoriametrics-rpm.spec index 359121d01..e34d0b106 100644 --- a/package/rpm/victoriametrics-rpm.spec +++ b/package/rpm/victoriametrics-rpm.spec @@ -1,8 +1,6 @@ -%global _prefix /usr/local - Name: victoriametrics -Version: 1.22.2 -Release: 1 +Version: 1.23.0 +Release: 3 Summary: The best long-term remote storage for Prometheus Group: Development Tools diff --git a/package/rpm/victoriametrics.service b/package/rpm/victoriametrics.service index c4965ab41..07a191959 100644 --- a/package/rpm/victoriametrics.service +++ b/package/rpm/victoriametrics.service @@ -6,8 +6,9 @@ After=network.target Type=simple StartLimitBurst=5 StartLimitInterval=0 -Restart=on-abort -ExecStart=/usr/local/bin/victoriametrics -storageDataPath=/var/lib/victoria-metrics-data start +Restart=on-failure +RestartSec=1 +ExecStart=/usr/bin/victoriametrics -storageDataPath=/var/lib/victoria-metrics-data ExecStop=/bin/kill -s SIGTERM $MAINPID LimitNOFILE=65536 LimitNPROC=32000 diff --git a/package/victoria-metrics.service b/package/victoria-metrics.service index 2769399aa..62daddf57 100644 --- a/package/victoria-metrics.service +++ b/package/victoria-metrics.service @@ -8,7 +8,7 @@ StartLimitBurst=5 StartLimitInterval=0 Restart=on-failure RestartSec=1 -ExecStart=/usr/local/bin/victoria-metrics-prod -storageDataPath=/var/lib/victoria-metrics-data +ExecStart=/usr/bin/victoria-metrics-prod -storageDataPath=/var/lib/victoria-metrics-data ExecStop=/bin/kill -s SIGTERM $MAINPID LimitNOFILE=65536 LimitNPROC=32000