Reputation: 83
I have these options on my .service file:
[Unit]
Description=Atualizador de Sincronizacao
[Service]
TimeoutStartSec=0
ExecStart=/opt/sn_home/sincronizador/bin/jarupdater.sh
but it does not start with the system (like sshd does, for instance) so I need to run a "systemctl start" command every time.
What option do I need to add in this unit so it starts with the system?
Upvotes: 4
Views: 1162
Reputation: 83
Required the [Install]
section on this unit where I added a WantedBy=multi-user.target
so the service would start when the system starts.
Finally I had to enable the unit with the command that Marshall Whittaker gave me:
systemctl enable myservice.service
Upvotes: 4