From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-1.0 required=5.0 tests=MAILING_LIST_MULTI, NICE_REPLY_A autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 3173 invoked from network); 17 Feb 2021 19:35:08 -0000 Received: from alyss.skarnet.org (95.142.172.232) by inbox.vuxu.org with ESMTPUTF8; 17 Feb 2021 19:35:08 -0000 Received: (qmail 9201 invoked by uid 89); 17 Feb 2021 19:35:30 -0000 Mailing-List: contact supervision-help@list.skarnet.org; run by ezmlm Sender: Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Received: (qmail 9194 invoked from network); 17 Feb 2021 19:35:30 -0000 X-Injected-Via-Gmane: http://gmane.org/ To: supervision@list.skarnet.org From: Ben Franksen Subject: Re: Path monitoring support in s6-services Date: Wed, 17 Feb 2021 20:29:09 +0100 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 In-Reply-To: Content-Language: en-US Am 17.02.21 um 10:26 schrieb Casper Ti. Vector: > On Wed, Feb 17, 2021 at 01:08:44PM +0530, billa chaitanya wrote: >> I am trying to start a service when a file/path is >> modified/touched/created.Do we have any mechanism in s6 that supports >> enabling a service up on monitoring a path? > > inotifyd (or something similar) + s6-svc (or s6-rc)? You can also write your own specialised daemon with a simple shell script a la inotifywait -q -m ... | while true; do # get the next event: event=$(head -1) ... done I am using this method in a production system. Cheers Ben