执行命令,添加配置内容,
systemctl edit --force --full xxx.service
[Unit]
Description=xxx
After=network.target
[Service]
Type=simple
# WorkingDirectory=xxx
ExecStart=xxx
Restart=on-failure
# User=root
# Group=root
[Install]
WantedBy=multi-user.target
启动服务,
# 启动服务
systemctl start supernode
# 开启自启
systemctl enable supernode