目录//etc/systemd/system$
whitecoin.service
[Unit]
Description=Whitecoin Mainnet Client
After=network.target
[Service]
ExecStart=/bin/sh -ec "exec /usr/local/bin/whitecoind -daemon&"
Type=forking
User=root
Group=root
Restart=on-failure
RestartSec=5
[Install]
WantedBy=multi-user.target
whitecoin-seeder.service
[Unit]
Description=Whitecoin Seeder
After=network.target
[Service]
WorkingDirectory=/opt/whitecoin-seeder
ExecStart=/bin/sh -ec "exec /opt/whitecoin-seeder/dnsseed -h dnsseeder.whitecoin.in -n vps.whitecoin.in -d 12 -m ylt88888.tom.com -daemon"
Type=forking
User=root
Group=root
Restart=on-failure
RestartSec=5
[Install]
WantedBy=multi-user.target
sudo systemctl status whitecoin-seeder.service
启动服务:sudo systemctl start whitecoin.service
关闭服务:sudo systemctl stop whitecoin.service
重启服务:sudo systemctl restart whitecoin.service
显示服务的状态:sudo systemctl status whitecoin.service
在开机时启用服务:sudo systemctl enable whitecoin.service
在开机时禁用服务:systemctl disable whitecoin.service
查看服务是否开机启动:systemctl is-enabled whitecoin.service
查看已启动的服务列表:systemctl list-unit-files|grep enabled
查看启动失败的服务列表:systemctl --failed