配置systemd启动文件

目录:/usr/lib/systemd/system
文件:name.service

[Unit]
Description=Service Name
After=network.target

[Service]
ExecStart=/usr/bin/python my.py
Restart=always
User=nobody
Group=nobody

[Install]
WantedBy=multi-user.target