systemctl status shows inactive dead

后端 未结 2 684
时光取名叫无心
时光取名叫无心 2021-02-02 12:18

I am trying to write my own (simple) systemd service which does something simple.( Like writing numbers 1 to 10 to a file, using the shell script). My service file looks like be

2条回答
  •  旧巷少年郎
    2021-02-02 13:15

    • You have set Type=Forking, but your service doesn't work. Try Type=oneshot
    • You have a "&" your ExecStart line, which is not necessary.
    • The service is disabled, which means it was not enabled to start at boot. You should run systemctl enable hello to set it to start at boot.

    You can check man systemd.directives to find an index of all the directives that you can use in your unit files.

提交回复
热议问题