From the blog

python脚本在Linux Redhat7开机启动

有时候,python程序需要确保linux server重启的时候可以自动加载。 cd /usr/lib/systemd/system touch proxy.service ################################################################### [Unit] Description=proxy After=multi-user.target [Service] Type=idle ExecStart=/usr/bin/python /appvol/ProxyServer/proxyserver.py 11081 PrivateTmp=true [Install] WantedBy=multi-user.target systemctl enable proxy systemctl start proxy 如果喜欢我,可以请我喝咖啡哟! 也可以关注我的微信订阅号devops186

微信打赏

Originally published at: https://www.robinlee.top/2018/12/24/python/python_auto_start/

Back to all posts