From: "Laurent Bercot" <ska-supervision@skarnet.org> To: "billa chaitanya" <billachaitanya@gmail.com>, supervision@list.skarnet.org Subject: Re: writing s6 services Date: Wed, 28 Oct 2020 14:01:52 +0000 Message-ID: <em0094f017-01ed-4ef8-ac43-4cf2adc58a58@elzian> (raw) In-Reply-To: <CAH9hU4KQLq815wqpn5PCj+-+WUsGdqHmHNxP9-6PWfmuJ_ATfw@mail.gmail.com> >1) Is there a possibility to add an ENV variable dynamically? >I have a shell script which fills out some variables like >IPADDRESS, SERVER etc .. which I need to use in starting a process later >as part of starting a service/stopping a service. You can do whatever you want in a run script, as long as by the end of it, the pid of the long-running daemon is the pid your run script was started as. If your run script is a shell script, you can absolutely source the script that fills out your environment variables. It is not the most idiomatic or safe way to do it, but it will absolutely work. >2) Does s6-supervise has the intelligence of findingout $MAINPID as the >systemd does?( >https://systemd-devel.freedesktop.narkive.com/dpY7US7K/a-little-help-with-mainpid-please Yes, that is the point of a process supervisor. You don't need a variable such as $MAINPID because the supervisor always remembers the pid of its child. You don't need a pidfile or anything of the sort. -- Laurent
next prev parent reply other threads:[~2020-10-28 14:01 UTC|newest] Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top 2020-10-28 8:01 billa chaitanya 2020-10-28 14:01 ` Laurent Bercot [this message] 2020-11-03 11:48 ` billa chaitanya 2020-11-03 16:54 ` Guillermo
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=em0094f017-01ed-4ef8-ac43-4cf2adc58a58@elzian \ --to=ska-supervision@skarnet.org \ --cc=billachaitanya@gmail.com \ --cc=supervision@list.skarnet.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: link
supervision - discussion about system services, daemon supervision, init, runlevel management, and tools such as s6 and runit This inbox may be cloned and mirrored by anyone: git clone --mirror http://inbox.vuxu.org/supervision # If you have public-inbox 1.1+ installed, you may # initialize and index your mirror using the following commands: public-inbox-init -V1 supervision supervision/ http://inbox.vuxu.org/supervision \ subscribe@list.skarnet.org public-inbox-index supervision Example config snippet for mirrors. Newsgroup available over NNTP: nntp://inbox.vuxu.org/vuxu.archive.supervision.general AGPL code for this site: git clone https://public-inbox.org/public-inbox.git