* [gentoo-user] systemd and local equivalent
@ 2013-08-15 21:41 covici
2013-08-16 4:44 ` Mark Pariente
0 siblings, 1 reply; 2+ messages in thread
From: covici @ 2013-08-15 21:41 UTC (permalink / raw
To: gentoo-user
Hi. I would like to be able to have an equivalent of /etc/local.d/
something to execute those commands which do not fit neatly into the
boot scheme -- for instance I have several things which have something
in init.d and I just have to say /etc/init.d/<thing> start after
everything is up. There are other miscellaneous commands I need to
issue, so how can I do this using systemd?
Thanks in advance for any suggestions.
--
Your life is like a penny. You're going to lose it. The question is:
How do
you spend it?
John Covici
covici@ccs.covici.com
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [gentoo-user] systemd and local equivalent
2013-08-15 21:41 [gentoo-user] systemd and local equivalent covici
@ 2013-08-16 4:44 ` Mark Pariente
0 siblings, 0 replies; 2+ messages in thread
From: Mark Pariente @ 2013-08-16 4:44 UTC (permalink / raw
To: gentoo-user
On Thu, 2013-08-15 at 17:41 -0400, covici@ccs.covici.com wrote:
> Hi. I would like to be able to have an equivalent of /etc/local.d/
> something to execute those commands which do not fit neatly into the
> boot scheme -- for instance I have several things which have something
> in init.d and I just have to say /etc/init.d/<thing> start after
> everything is up. There are other miscellaneous commands I need to
> issue, so how can I do this using systemd?
>
> Thanks in advance for any suggestions.
>
You could write a simple unit file /etc/systemd/system/my-stuff.service:
[Unit]
Description=My Stuff
[Service]
Type=oneshot
ExecStart=/../my-script --start
ExecStop=/../my-script --stop
[Install]
WantedBy=multi-user.target
And then enable this service with:
systemctl enable my-stuff.service
Please note you might need to add some dependencies (for example if you
need networking etc.) to make sure everything your script needs is ready
to use.
--Mark
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2013-08-16 4:45 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-08-15 21:41 [gentoo-user] systemd and local equivalent covici
2013-08-16 4:44 ` Mark Pariente
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox