繁体   English   中英

systemctl服务在系统重启后没有启动

[英]systemctl service not starting after system restart

我有这项服务,我希望能够在系统重启时作为服务启动。 我正在使用Ubuntu 15.10。 服务配置文件如下所示:

[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

该服务使用systemctl命令完美启动,但在系统重启后不会自动启动。

做这个:

systemctl enable servicename.service

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

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM