issues with start/shutdown scripts

Since I can’t find any useful documentation on how to write shutdown/startup scripts for systemd itself, still using the following in scripts

BEGIN INIT INFO

Provides: somedaemon

Required-Start:

Required-Stop:

Default-Start: 3 5

Default-Stop: 0 1 6

Description:

END INIT INFO

Startup works fine after place somedaemon script into /etc/init.d and executing : systemctl enable somedaemon ; systemctl start somedaemon
shutdown execution does not seem to work so well, in face it isn’t getting shutdown. Is there something simple I’m missing?

Thanks,
matt

On 05/18/2017 01:34 PM, skunkboy wrote:[color=blue]

Since I can’t find any useful documentation on how to write
shutdown/startup scripts for systemd itself, still using the following
in scripts[/color]

What documentation have you found? What have you tried? In general the
service unit files are fairly simple; I worked through docs and examples a
couple years ago and found it pretty straight-forward, but since then I’ve
found I was lucky and that, like anything, it can depend on the scenario.
Knowing how your ‘somedaemon’ thing works is probably useful, as it
understanding its startup properly.
[color=blue]

BEGIN INIT INFO

Provides: somedaemon

Required-Start:

Required-Stop:

Default-Start: 3 5

Default-Stop: 0 1 6

Description:

END INIT INFO[/color]

I presume this daemon does not have any service/system dependencies, so
that’s interesting, and probably not something I’d emulate. Most services
I’ve seen at least have something like $local_fs or $network in there.
[color=blue]

Startup works fine after place somedaemon script into /etc/init.d and
executing : systemctl enable somedaemon ; systemctl start somedaemon
shutdown execution does not seem to work so well, in face it isn’t
getting shutdown. Is there something simple I’m missing?[/color]

Care to share the output from your shutdown attempt? I presume you are
using ‘stop’ and not ‘shutdown’ for the service.

Also, one of the benefits of systemd is great logging of what happens when
a service tires to do something. What does the following show:

[CODE[
systemctl status somedaemon
[/CODE]


Good luck.

If you find this post helpful and are logged into the web interface,
show your appreciation and click on the star below.

If you want to send me a private message, please let me know in the
forum as I do not use the web interface often.

I left it generic and didn’t fill in any details. Our oracle dbas say it is working now?

Anyways thanks for the response :slight_smile:

Matt