0
Linux XXXXXXXX 3.10.0-1160.62.1.el7.x86_64 #1 SMP Wed Mar 23 09:04:02 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux

cat -vetn rc.service
     1  [Unit]$
     2  Description=Script Daemon$
     3  $
     4  [Service]$
     5  Type=simple$
     6  ExecStart=/opt/xxx/bin/rc$
     7  Restart=on-failure$
     8  $
     9  [Install]$
    10  WantedBy=default.target$

As user xxx, wen I run nohup /opt/xxx/bin/rc & it runs fine As user xxx when /opt/xxx/bin/rc it runs fine.

I do this as root:

systemctl daemon-reload; systemctl enable rc.service;
(No errors thrown)

systemctl status rc.service;
Loaded: loaded (/etc/systemd/system/rc.service; enabled; vendor preset: disabled)
   Active: inactive (dead)

Mar 19 14:31:16 XXXXXXXX systemd[1]: [/etc/systemd/system/rc.service:13] Missing '='.

You will note that my unit file has only 10 lines!!

Romeo Ninov
  • 5,263
  • 4
  • 20
  • 26

0 Answers0