From fc4f0e5abecdd1dc601bcb5cee87fb7d14995c9a Mon Sep 17 00:00:00 2001 From: Agostino Sarubbo Date: Mon, 15 Jun 2020 16:31:12 +0200 Subject: app-metrics/queuemetrics: use a better syntax Package-Manager: Portage-2.3.99, Repoman-2.3.22 Signed-off-by: Agostino Sarubbo --- app-metrics/queuemetrics/ChangeLog | 3 +++ app-metrics/queuemetrics/Manifest | 4 ++-- app-metrics/queuemetrics/files/queuemetrics.initd | 18 +++++++++--------- 3 files changed, 14 insertions(+), 11 deletions(-) diff --git a/app-metrics/queuemetrics/ChangeLog b/app-metrics/queuemetrics/ChangeLog index 50dd593..4b57883 100644 --- a/app-metrics/queuemetrics/ChangeLog +++ b/app-metrics/queuemetrics/ChangeLog @@ -1,3 +1,6 @@ + 15 Jun 2020; Agostino Sarubbo files/queuemetrics.initd: + app-metrics/queuemetrics: use a better syntax + *queuemetrics-19.10.17 (27 Apr 2020) 27 Apr 2020; Agostino Sarubbo +queuemetrics-19.10.17.ebuild, diff --git a/app-metrics/queuemetrics/Manifest b/app-metrics/queuemetrics/Manifest index 858b854..8776589 100644 --- a/app-metrics/queuemetrics/Manifest +++ b/app-metrics/queuemetrics/Manifest @@ -1,6 +1,6 @@ AUX 25queuemetrics 268 SHA256 b07c45fbe96e55f896e3c3688c629e3543eba48222303df50ec351140ac77a31 SHA512 43b0b751e7bd56d0ad5c74164883c0d18a02f5f2150cee380c06e76e1a5d3d19da1e7101eb072390b5d49fffc299fa345651e1af37b2989d6245e5e3db6982fe WHIRLPOOL 0492f1c1d374d3096f66742475a1a9a4d1610d7b954389f2d983a7e3b7467fedc91d9bb425b9fdcd55be77f3911468a70650e7c4b35212d7d9a95f99a31cb96e AUX queuemetrics.confd 1574 SHA256 ef95ae45e219689ae192deeed7576c158ebe7a04d45d19c1d7498aadb2c7d9e6 SHA512 d4b5ed05bfb3285af0cd0c19b99d2cf23fe6f485ec927efa6578a2b18e56fe80486e7772310c3a10530cf45bfb7f0896699ea76016d247a88284a96c13c1adc3 WHIRLPOOL de03e09655333d7d9bac5f98e34a32da203fbda20081508b7d0fcdab7ad78a7f8901dd842300fd6f6ded0a6dd5329cde3646a355b867cdfbecdef6d948cc25a3 -AUX queuemetrics.initd 1429 SHA256 496654f27d1a00e42605d5284d9f34b010d6e68bff29b6f36e8a2f79d6208289 SHA512 bff93c0543ca34f1aec4207e0b13cf30a97d2c3c1abbc6073460ed2d61d1fb98d9fb6904bfa5463748be2d8ebd46bb82860b23014b9ba6ea2d2d5ee0efa82457 WHIRLPOOL bfd2dde4250916295d1a27fba8721667a18ddf791d0b16f6c2c61386e373681888b310fc0fba78802e2907a12e27f107bd3fb06891f2a9f2007e7c839c27fa79 +AUX queuemetrics.initd 1419 SHA256 47c587114431daa84287a0633b1fb51851d05354d9cd0dfb5ad529f35d3b6e20 SHA512 be91dd8d73fbcb183f28b4f02180ee023529985c8b9c8eba5de41f1120ed6190a341246e2894a312eeb85bbcf1fa858024d35b209f5c751290c5425dbc71fd13 WHIRLPOOL a47b7b174f8f6bdcd3b6747d7dd0e84300480c0ebee5839af633228f53f175451784b96c5e93f7b45c75741cbfa232e056a0372bb5f4887c22c96c7fdfd4e81c AUX queuemetrics.service 424 SHA256 c83538037ffcf005fc5a9d321f9e78d173af6f4809c4559e65bd2cb245868904 SHA512 4f4eb0a74780d35d9dd088c6ba60937a2ff44c6e63c942e670f756bd316e3e6212a660e74e0548df64c5e4c874890ae89ad5eefc26962a9e0bbdb4fcf07c92ac WHIRLPOOL 1873a69be19d82a0d636b3154425023f90b9eda612ff874869b99222282610c1cc1e40cd41b6174634b3833b81d22c28bcfe3a17b5088483374b62dc23d19bb9 AUX queuemetrics.service.conf 1149 SHA256 c5e7f5a7347967eaba34af182d1e80873f40007358ad190d9b116527b79f6b13 SHA512 c3ffd8a25792542842403f8004808411bbf94690c5ff639c7902c0598028233b8d32d39e3de4de730fc3add558dacd456f1f4fb969278cb2ff7470536c8f32f7 WHIRLPOOL 9f0cf1c1398af905a742b746bdc7fbb77bcf8e7d0d29957fc026d3596afbbb660d055f870d2628d365dc025adbf3b030cbe14423127b94c910cca05eb5863419 AUX queuemetrics.socket 126 SHA256 a04679c03f2cd417cd03e6e6d233cdc749a4adc86cb04ad992c586ec52519496 SHA512 7c2040504c36b49970895bfaf4874977275a3e51aad36f065efbd3a956832f486f07b98d6ab2c521a77a3f67e8b494cf5600e4b7025e733d9304b1b614315dcc WHIRLPOOL af2836262d5e0e3b62929f7a46a054bdccf1e4299b0a95b934d10e45185cdf7536481fd6c41dc6fd244c027405db12a32cea1a8b9f6d1df94546492ff741c354 @@ -8,5 +8,5 @@ AUX server.xml 1628 SHA256 6efaee54a0a4246a82e835ff94ec37906f0846b517bf066d0b728 DIST QueueMetrics-19.10.17.tar.gz 16241995 SHA256 4ac217a7dbb87816782fb532492dd9e35e9901c029f307ae57bf1faf0a5b924e SHA512 090d8eaf706efc42c09c973d48ee15ef6e13fbc94fd700d2c693d4f433588249518c64738400c2d00028edde5c1a82bde4875fa1762dd8d649b748e4c7e54ca9 WHIRLPOOL 5e99492bea966c2e6488a4331d746f48a97a759185f2320eb74b93f96df69bc116fd72da30772df63e03f9d7af74110dfffcf12fa048152b90aedd8b952d65ea DIST apache-tomcat-8.5.54.tar.gz 10312541 SHA256 44bd3f8d13983349bab102a3d03b67ac4bf5d073afc2d16e3339c3d88f4b92d9 SHA512 dc3ba0183d1e6f6006e5430e91abbc0758bdb719efebea5809f7034c9a28c590a764d8fcf2528a27a98cb86531e94cd9dc5a92cdbcae36e808ced0e5f1c665b8 WHIRLPOOL 542d6fb492ceabc802612df3919552a728bd4cdc0f9fcd7e124d9f27f44ba48194f603df4ae81a6b84b05f617a2f6a54afdd5864a519c5d838941686be729b4f EBUILD queuemetrics-19.10.17.ebuild 1979 SHA256 4e3381008c23bb976e64f7b62e7f9c848eb545640333737acdd32aeeac9203d3 SHA512 7ecb3e278bf9803601221c24fc9181269315147ad0dea88c16bc7d04e120f70b1d48de3840959bcd8b53a533f1613957c0bf1cdab93f12dde6daa55bee8fac29 WHIRLPOOL 03d18ccde57fdd62d7d89ca2935305eb77933c0381abdfe7715ab7523f1a7d47685c91187c7271b82881cdf974d59caee31cd580108e5ade194e05bfa4ecba88 -MISC ChangeLog 5115 SHA256 98cc29e17f4ee35c2a7101a2879384a6608d706e832ba3385979baa6a58ff841 SHA512 b221650bad3508c97642d10f6414c31ee455e02f1859216209faf3c257628d09919420f3d35c5c2af67ee54b6b345ed7e289b4869b15d07ff52f7610853944c8 WHIRLPOOL fdcfe2ad4c7574b593869780f7ddd4eb9089f45db10072408a932415eacc2702b7fa9dc4aa9d6a1f042dca69583382d0556ec118f2cf119986a3337d983a03d5 +MISC ChangeLog 5239 SHA256 9ba45ea8f6467c8d8b9e6910c9cb79c1971930be487d7d28bd155a8de03505bb SHA512 c7c70df6a8276e24b08e01197232f52f6e987710cc643416bb98bdb94e750ba3080c90442c99ca67b31ab10a10850b946a3e06ce637857d638a9a6d76b0ec668 WHIRLPOOL b6d7f2673d618b658ba93fdfde56ffedab07c894411c672a0768cf4b5f7c6cf96a4be8d8883be34cbd730edb9f6c69568c650ad9edaa3e5a27a6a836d8ba49cc MISC metadata.xml 389 SHA256 3d4f1ca7609f74c3bddef49ce0d31edb1b23cd221ee6abe001abecaac65ec87e SHA512 52df615f053daaa05ae886a8c32149d4b714e7cb8e03804fc39b16160dd3f1381645c9d5a15ce113e875234fbecbf005879dd57bbb418eddfcc901354da498f2 WHIRLPOOL 506f357243b5b1bb8e427132b19b86865932dba8344c895debb1074fa301f308850ced982a2eb29c5becebfa788b5ed7465fd285e2bf53bae95a8d680fe8cc20 diff --git a/app-metrics/queuemetrics/files/queuemetrics.initd b/app-metrics/queuemetrics/files/queuemetrics.initd index 274d0e5..2515a9a 100644 --- a/app-metrics/queuemetrics/files/queuemetrics.initd +++ b/app-metrics/queuemetrics/files/queuemetrics.initd @@ -1,11 +1,11 @@ #!/sbin/openrc-run -# Copyright 2019 Agostino Sarubbo +# Copyright 2020 Agostino Sarubbo # Distributed under the terms of the GNU General Public License v2 -PIDFILE="/run/queuemetrics.pid" +PIDFILE="/run/${SVCNAME}.pid" start() { - ebegin "Starting QueueMetrics" + ebegin "Starting ${SVCNAME}" start-stop-daemon \ --start \ --quiet \ @@ -13,7 +13,7 @@ start() { --stdout ${CATALINA_HOME}/logs/catalina.out \ --stderr ${CATALINA_HOME}/logs/catalina.out \ --chdir ${CATALINA_TMPDIR} \ - --user queuemetrics:queuemetrics \ + --user ${SVCNAME}:${SVCNAME} \ --make-pidfile --pidfile ${PIDFILE} \ --exec java \ -- \ @@ -26,7 +26,7 @@ start() { stop() { MYPID="$( cat ${PIDFILE} )" - ebegin "Stopping QueueMetrics" + ebegin "Stopping ${SVCNAME}" start-stop-daemon \ --stop \ --quiet \ @@ -40,17 +40,17 @@ stop() { stop sleep 5 - # check if the pid still exist and wait fro graceful shutdown + # check if the pid still exist and wait for a graceful shutdown COUNT="1" - while [ ! -z "$( ps -p ${MYPID} | grep ${MYPID} )" -a "${COUNT}" -lt "5" ] + while [ -n "$( ps -p ${MYPID} | grep ${MYPID} )" ] && [ "${COUNT}" -lt "5" ] do - echo "Waiting queuemetrics stop for 3 seconds" + echo "Waiting ${SVCNAME} stop for 3 seconds" sleep 3 let COUNT++ done # if the pid still exists, then kill it - if [ ! -z "$( ps -p ${MYPID} | grep ${MYPID} )" ] + if [ -n "$( ps -p ${MYPID} | grep ${MYPID} )" ] then start-stop-daemon --stop --quiet --pidfile ${PIDFILE} --signal=9 kill -9 ${MYPID} -- cgit v1.2.3-65-gdbad