Comment

Comment by klapinat0r

Care to give an example? What I'd call "dead simple init.d custom services" I find very easy to do in systemd, so I wonder if our definition is the same.

Here's what I'd call a simple init.d-like example. non-needed things (if you think it's too complex) include: wait for fs mount and network, custom reload command, "don't log stdout"

  [Unit]
  After=network.target
  AssertPathIsMountPoint=/mnt/service-data-if-needed

  [Service]
  ExecStart=/some/binary
  Environment=CONF=/etc/i/guess.conf USER=nonrootmaybe
  ExecReload=/bin/pkill binary
  KillMode=process
  Restart=always
  StandardOutput=null

  [Install]
  WantedBy=multi-user.target
EDIT: man 5 systemd.unit
parent klapinat0r 10 years ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton