Received: from mail-lf1-f68.google.com (mail-lf1-f68.google.com [209.85.167.68]) by nld3-dev1.alpinelinux.org (Postfix) with ESMTPS id B83CD781AA3 for <~alpine/aports@lists.alpinelinux.org>; Mon, 6 Jan 2020 22:14:04 +0000 (UTC) Received: by mail-lf1-f68.google.com with SMTP id r14so37467717lfm.5 for <~alpine/aports@lists.alpinelinux.org>; Mon, 06 Jan 2020 14:14:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-language:content-transfer-encoding; bh=8ib3qnepDq12hotrlfRWjSDnMWqszuUX+ToneVTVqIU=; b=bNywHFwVnZzC+sM6ymcy7zNUwgSO1Z8eud/qU8r9wj5oLJsQrO9cvoRoH3ovAbmTZT 9zErf7B/845Vw9EFXhkSkXiqnG7sUiF47ciYAO/SlRADwHDwnGjyxpzYZxYZHfC5Nx5z wywoIrHkRqaLKmnB+XSF7Qrk/iJ00Vox/Sdrfy/UDJH3WyZkwTWqgdoCqt8oJUfOHEuV d6QUdr+VNJp/bxbJ+bH3JciUTpdXP9dBEMQupj+pV9QpGcGF65WmYFAcYLX1wb0aKjcA ARkCsPgjNJvaNsy8joTNFlLakqlaV/fXWLjVN9J+w0FGBw4kDA2ZgMDt+l5sCn9K0e/r ZNWw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=8ib3qnepDq12hotrlfRWjSDnMWqszuUX+ToneVTVqIU=; b=CE3iTy+rGOCkga5H2fPS+OzFSgm2S2vqc8+e/9tTFZVkk6VU6j5XmFOnRLg6Rk1iRw 86MQ0tK5PTAuU8UIqvDK3gUtitW8KyM8fB64HiuvdDxe1EzSVVq8VhKTBpJgm7i8p+Fq WQiajGzYsj+BiGL5RgIUSzhHOZulDioSs4QYkUY/HgMUyrd5Hakv2FkXd0wpZf0LDrby C7MYJsZigE2LtHV4qjN4HxP3AvIs5mUbO7cFpJk+8uEbCGw5jQHy2ym5rSoF8bf9Fa94 zMUVO4bxbM4iFGvaRaSxyQVftfPQjAYz6jmTfAoNH2T1twgGoj+u056NHb1CKJDswlcD NJBw== X-Gm-Message-State: APjAAAVEZl3enn6bJS3yQXKZ8tz2uu+P7beaz9a3OsdVusLB+NZJciAs YlQ8TmgcnAQmAt5q/fpIRzl6dh2Y X-Google-Smtp-Source: APXvYqx+Q8VOm2ErgYgLxpc3gDY1AM+ynYOEMvLgbt18SU7Ln0ylVHOxr5S47pqY7MrSdkr+aIwFYQ== X-Received: by 2002:ac2:531b:: with SMTP id c27mr318826lfh.91.1578348843332; Mon, 06 Jan 2020 14:14:03 -0800 (PST) Received: from kpc.kaey.ru ([91.123.18.165]) by smtp.gmail.com with ESMTPSA id s9sm25702405ljh.90.2020.01.06.14.14.02 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 06 Jan 2020 14:14:02 -0800 (PST) Subject: Re: [PATCH] community/prometheus: add reload to init.d To: Drew DeVault , ~alpine/aports@lists.alpinelinux.org References: <20200106171945.2937-1-sir@cmpwn.com> From: Konstantin Kulikov Message-ID: Date: Tue, 7 Jan 2020 01:14:01 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.3.1 MIME-Version: 1.0 In-Reply-To: <20200106171945.2937-1-sir@cmpwn.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit On 1/6/20 8:19 PM, Drew DeVault wrote: > --- > community/prometheus/APKBUILD | 4 ++-- > community/prometheus/prometheus.initd | 8 ++++++++ > 2 files changed, 10 insertions(+), 2 deletions(-) > > diff --git a/community/prometheus/APKBUILD b/community/prometheus/APKBUILD > index e5594d6942..1e46bc83dc 100644 > --- a/community/prometheus/APKBUILD > +++ b/community/prometheus/APKBUILD > @@ -1,7 +1,7 @@ > # Maintainer: Drew DeVault > pkgname=prometheus > pkgver=2.15.1 > -pkgrel=3 > +pkgrel=4 > pkgdesc="The Prometheus monitoring system and time series database" > url="https://github.com/prometheus/prometheus" > arch="all" > @@ -72,4 +72,4 @@ package() { > > sha512sums="b08dfa48bddb6e007cd0fd4553847e824d6adfc047d97151b8dd12dbd1f67cfb9301824b320f1cabe9644159e6968b3fd2ee8104a5d53822a9965423c4bb47b5 prometheus-2.15.1.tar.gz > 24b34e586238d5b331639aa5c43b6a927692f251af2cea2787335eab30d2fc7d46975059595db4697ae0dc1d35b5e23cfc4e4b2e424442c209a05283ca22a239 prometheus.confd > -bdc179cb3b8b5d3416e74a0b31002bd7b456b204404579dd40c38cade43eb26b106d16ea2597755035035eca567d34bfa44913eaa28870c3f22e1105d47908ab prometheus.initd" > +8845d50026c1cea525dae392fa95e06e0b20184325fa0af78e50b5fbc18dabf5526d2ef61798e1e9041840633c6057958e84ef8cce314a7b68ca67fc42bc4fe5 prometheus.initd" > diff --git a/community/prometheus/prometheus.initd b/community/prometheus/prometheus.initd > index 446466225b..173f8adfb1 100644 > --- a/community/prometheus/prometheus.initd > +++ b/community/prometheus/prometheus.initd > @@ -7,6 +7,8 @@ command_args="--config.file=$prometheus_config_file \ > --storage.tsdb.path=$prometheus_storage_path \ > --storage.tsdb.retention.time=$prometheus_retention_time" > command_user="prometheus:prometheus" > +pidfile="/run/${RC_SVCNAME}.pid" > +extra_started_commands="reload" > > start_pre() { > [ -n "$output_log" ] && checkpath -f "$output_log" \ > @@ -15,3 +17,9 @@ start_pre() { > -m 644 -o prometheus:prometheus > checkpath -d "$prometheus_storage_path" -m 755 -o prometheus:prometheus > } > + > +reload() { > + ebegin "Reloading $RC_SERVNAME" > + start-stop-daemon --signal HUP --exec "$command" --pidfile "$pidfile" > + eend $? > +} > This init script uses supervise-daemon, correct invocation for reload is supervise-daemon $RC_SVCNAME --signal HUP pidfile is also unneccessary.