From: Mark Pariente <markpariente@gmail.com>
To: gentoo-user@lists.gentoo.org
Subject: Re: [gentoo-user] systemd and local equivalent
Date: Thu, 15 Aug 2013 21:44:53 -0700 [thread overview]
Message-ID: <1376628293.1883.14.camel@siegeengine> (raw)
In-Reply-To: <21736.1376602908@ccs.covici.com>
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
prev parent reply other threads:[~2013-08-16 4:45 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-08-15 21:41 [gentoo-user] systemd and local equivalent covici
2013-08-16 4:44 ` Mark Pariente [this message]
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=1376628293.1883.14.camel@siegeengine \
--to=markpariente@gmail.com \
--cc=gentoo-user@lists.gentoo.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
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox