Subject: | |
From: | |
Reply To: | |
Date: | Mon, 10 Feb 2014 17:02:13 -0500 |
Content-Type: | text/plain |
Parts/Attachments: |
|
|
On Mon, Feb 10, 2014 at 1:12 PM, David Sommerseth
<[log in to unmask]> wrote:
> On 10/02/14 08:08, Andrew Z wrote:
>>
>> i finally caved in and started reading on systemd. It apperas it (
>> systemd) will be enabled by default on EL7.
>> Does it mean i'll have to manually move all init scripts i wrote over
>> the years ? I think the short answer is "no", but just want to clarify.
>
> As others have said, systemd supports SysV init scripts. However,
> unless your init script is doing lots of intricate stuff, have a look at
> the unit files shipped in systemd ... Like these ones:
>
> /usr/lib/systemd/system/sshd.service
> /usr/lib/systemd/system/postfix.service
>
> It's not hard to switch over, unless your init script does lots of other
> things than just starting and stopping services.
To see a "complex" systemd service file, take a look at a Fedora 20
nfs-utils; nfsd is started by three lines:
ExecStartPre=/usr/lib/nfs-utils/scripts/nfs-server.preconfig
ExecStartPre=/usr/sbin/exportfs -r
ExecStart=/usr/sbin/rpc.nfsd $RPCNFSDARGS $RPCNFSDCOUNT
I would've used just one ExecStart calling
"/usr/lib/nfs-utils/scripts/nfs-server.script" but the maintainer
clearly disagrees. :)
|
|
|