1

I have this service which I want to be able to start as a service on system restart. I am using Ubuntu 15.10. The service configuration file looks like this:

[Unit]
Description=Service client 
After=syslog.target

[Service]
ExecStart=/bin/bash -c "/usr/local/bin/service_clientd start"
ExecStop=/bin/bash -c "/usr/local/bin/service_clientd stop"
Type=simple

[Install]
WantedBy=multi-user.target

The service starts perfectly with systemctl command, but does not start automatically after system restart.

4

1 回答 1

4

做这个:

systemctl enable servicename.service

https://wiki.archlinux.org/index.php/systemd#Using_units

于 2016-03-16T15:34:44.237 回答