diff --git a/scripts/build_packages.sh b/scripts/build_packages.sh index ef69922b5b..9789c77944 100755 --- a/scripts/build_packages.sh +++ b/scripts/build_packages.sh @@ -17,7 +17,7 @@ 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} @@ -25,7 +25,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 \ @@ -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 @@ -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 \ @@ -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 @@ -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 \ @@ -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 @@ -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 \ @@ -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 @@ -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 \ diff --git a/scripts/config/systemd/metrictank.service b/scripts/config/systemd/metrictank.service index 626a65ec15..bec66ac435 100644 --- a/scripts/config/systemd/metrictank.service +++ b/scripts/config/systemd/metrictank.service @@ -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 diff --git a/scripts/config/sysvinit/init.d/metrictank b/scripts/config/sysvinit/init.d/metrictank index cbc9576564..52ce70effc 100755 --- a/scripts/config/sysvinit/init.d/metrictank +++ b/scripts/config/sysvinit/init.d/metrictank @@ -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" diff --git a/scripts/config/upstart-0.6.5/metrictank.conf b/scripts/config/upstart-0.6.5/metrictank.conf index cf330e9640..0646f3ff18 100644 --- a/scripts/config/upstart-0.6.5/metrictank.conf +++ b/scripts/config/upstart-0.6.5/metrictank.conf @@ -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 diff --git a/scripts/config/upstart/metrictank b/scripts/config/upstart/metrictank index 2595ab4724..c0d5137339 100644 --- a/scripts/config/upstart/metrictank +++ b/scripts/config/upstart/metrictank @@ -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"