Skip to content
This repository has been archived by the owner on Aug 23, 2023. It is now read-only.

Commit

Permalink
mt binaries should be in /usr/bin not /usr/sbin
Browse files Browse the repository at this point in the history
fix #820
  • Loading branch information
Dieterbe committed Jan 24, 2018
1 parent 5d63d48 commit 8075ba6
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 14 deletions.
20 changes: 10 additions & 10 deletions scripts/build_packages.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,15 @@ VERSION=$(git describe --long --always)
## debian wheezy ##

BUILD=${BUILD_TMP}/sysvinit
mkdir -p ${BUILD}/usr/sbin
mkdir -p ${BUILD}/usr/bin
mkdir -p ${BUILD}/etc/metrictank
PKG=${BUILD_PKG}/sysvinit
mkdir -p ${PKG}

cp ${BASE}/config/metrictank-package.ini ${BUILD}/etc/metrictank/metrictank.ini
cp ${BASE}/config/storage-schemas.conf ${BUILD}/etc/metrictank/
cp ${BASE}/config/storage-aggregation.conf ${BUILD}/etc/metrictank/
cp ${BUILD_ROOT}/{metrictank,mt-*} ${BUILD}/usr/sbin/
cp ${BUILD_ROOT}/{metrictank,mt-*} ${BUILD}/usr/bin/

PACKAGE_NAME="${PKG}/metrictank-${VERSION}_${ARCH}.deb"
fpm -s dir -t deb \
Expand All @@ -41,7 +41,7 @@ fpm -s dir -t deb \
## ubuntu 14.04 ##

BUILD=${BUILD_TMP}/upstart
mkdir -p ${BUILD}/usr/sbin
mkdir -p ${BUILD}/usr/bin
mkdir -p ${BUILD}/etc/init
mkdir -p ${BUILD}/etc/metrictank
PKG=${BUILD_PKG}/upstart
Expand All @@ -50,7 +50,7 @@ mkdir -p ${PKG}
cp ${BASE}/config/metrictank-package.ini ${BUILD}/etc/metrictank/metrictank.ini
cp ${BASE}/config/storage-schemas.conf ${BUILD}/etc/metrictank/
cp ${BASE}/config/storage-aggregation.conf ${BUILD}/etc/metrictank/
cp ${BUILD_ROOT}/{metrictank,mt-*} ${BUILD}/usr/sbin/
cp ${BUILD_ROOT}/{metrictank,mt-*} ${BUILD}/usr/bin/

PACKAGE_NAME="${PKG}/metrictank-${VERSION}_${ARCH}.deb"
fpm -s dir -t deb \
Expand All @@ -65,7 +65,7 @@ fpm -s dir -t deb \
## ubuntu 16.04, Debian 8, CentOS 7 ##

BUILD=${BUILD_TMP}/systemd
mkdir -p ${BUILD}/usr/sbin
mkdir -p ${BUILD}/usr/bin
mkdir -p ${BUILD}/lib/systemd/system/
mkdir -p ${BUILD}/etc/metrictank
mkdir -p ${BUILD}/var/run/metrictank
Expand All @@ -76,7 +76,7 @@ cp ${BASE}/config/metrictank-package.ini ${BUILD}/etc/metrictank/metrictank.ini
cp ${BASE}/config/storage-schemas.conf ${BUILD}/etc/metrictank/
cp ${BASE}/config/storage-aggregation.conf ${BUILD}/etc/metrictank/
cp ${BASE}/config/systemd/metrictank.service $BUILD/lib/systemd/system/
cp ${BUILD_ROOT}/{metrictank,mt-*} ${BUILD}/usr/sbin/
cp ${BUILD_ROOT}/{metrictank,mt-*} ${BUILD}/usr/bin/

PACKAGE_NAME="${PKG}/metrictank-${VERSION}_${ARCH}.deb"
fpm -s dir -t deb \
Expand All @@ -89,7 +89,7 @@ fpm -s dir -t deb \
## centos 7 ##

BUILD=${BUILD_TMP}/systemd-centos7
mkdir -p ${BUILD}/usr/sbin
mkdir -p ${BUILD}/usr/bin
mkdir -p ${BUILD}/lib/systemd/system/
mkdir -p ${BUILD}/etc/metrictank
mkdir -p ${BUILD}/var/run/metrictank
Expand All @@ -100,7 +100,7 @@ cp ${BASE}/config/metrictank-package.ini ${BUILD}/etc/metrictank/metrictank.ini
cp ${BASE}/config/storage-schemas.conf ${BUILD}/etc/metrictank/
cp ${BASE}/config/storage-aggregation.conf ${BUILD}/etc/metrictank/
cp ${BASE}/config/systemd/metrictank.service $BUILD/lib/systemd/system/
cp ${BUILD_ROOT}/{metrictank,mt-*} ${BUILD}/usr/sbin/
cp ${BUILD_ROOT}/{metrictank,mt-*} ${BUILD}/usr/bin/

PACKAGE_NAME="${PKG}/metrictank-${VERSION}.el7.${ARCH}.rpm"
fpm -s dir -t rpm \
Expand All @@ -113,7 +113,7 @@ fpm -s dir -t rpm \
## CentOS 6 ##

BUILD=${BUILD_TMP}/upstart-0.6.5
mkdir -p ${BUILD}/usr/sbin
mkdir -p ${BUILD}/usr/bin
mkdir -p ${BUILD}/etc/init
mkdir -p ${BUILD}/etc/metrictank
PKG=${BUILD_PKG}/upstart-0.6.5
Expand All @@ -123,7 +123,7 @@ cp ${BASE}/config/metrictank-package.ini ${BUILD}/etc/metrictank/metrictank.ini
cp ${BASE}/config/storage-schemas.conf ${BUILD}/etc/metrictank/
cp ${BASE}/config/storage-aggregation.conf ${BUILD}/etc/metrictank/
cp ${BASE}/config/upstart-0.6.5/metrictank.conf $BUILD/etc/init
cp ${BUILD_ROOT}/{metrictank,mt-*} ${BUILD}/usr/sbin/
cp ${BUILD_ROOT}/{metrictank,mt-*} ${BUILD}/usr/bin/

PACKAGE_NAME="${PKG}/metrictank-${VERSION}.el6.${ARCH}.rpm"
fpm -s dir -t rpm \
Expand Down
2 changes: 1 addition & 1 deletion scripts/config/systemd/metrictank.service
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Group=root
Type=simple
Restart=on-failure
WorkingDirectory=/var/run/metrictank
ExecStart=/usr/sbin/metrictank -config=/etc/metrictank/metrictank.ini
ExecStart=/usr/bin/metrictank -config=/etc/metrictank/metrictank.ini
LimitNOFILE=102400
TimeoutStopSec=60

Expand Down
2 changes: 1 addition & 1 deletion scripts/config/sysvinit/init.d/metrictank
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ PATH=/sbin:/usr/sbin:/bin:/usr/bin
export PATH

name=metrictank
program=/usr/sbin/metrictank
program=/usr/bin/metrictank
args=-config\\\=/etc/metrictank/metrictank.ini
pidfile="/var/run/$name.pid"

Expand Down
2 changes: 1 addition & 1 deletion scripts/config/upstart-0.6.5/metrictank.conf
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,6 @@ script
[ -r "/etc/default/metrictank" ] && . "/etc/default/metrictank"
[ -r "/etc/sysconfig/metrictank" ] && . "/etc/sysconfig/metrictank"
set +a
exec chroot --userspec root:root / /usr/sbin/metrictank "-config=/etc/metrictank/metrictank.ini" >> /var/log/metrictank-stdout.log 2>> /var/log/metrictank-stderr.log
exec chroot --userspec root:root / /usr/bin/metrictank "-config=/etc/metrictank/metrictank.ini" >> /var/log/metrictank-stdout.log 2>> /var/log/metrictank-stderr.log
end script

2 changes: 1 addition & 1 deletion scripts/config/upstart/metrictank
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,4 @@ setgid root
console log # log stdout/stderr to /var/log/upstart/


exec /usr/sbin/metrictank "-config=/etc/metrictank/metrictank.ini"
exec /usr/bin/metrictank "-config=/etc/metrictank/metrictank.ini"

0 comments on commit 8075ba6

Please sign in to comment.