command = [enable, disable, start, stop, restart,status]
systemctl command yourServiceName.service
更新服务systemctl daemon-reload
例:
[Unit]
Description=ywhtcp
After=network.target
[Service]
Type=simple
User=root
Restart=on-failure
RestartSec=5s
ExecStart=/usr/local/python38/bin/python3 /ywhtcp.py
PrivateTmp=true
[Install]
WantedBy=multi-user.target
注:service只允许用绝对路径,就算全局python也不行