注册系统服务
/etc/systemd/system目录下
[Unit] Description=rpc service After=network.target [Service] ExecStart= -/bin/bash -c "TERM=linux python /root/zrpc_service.py" ExecStop= -/bin/bash -c "TERM=linux ps auxww | grep 'zrpc_service.py' | awk '{print $2}' | xargs kill -9" [Install] WantedBy=default.target
systemctl daemon-reload