![](/img/trans.png)
[英]Passing arguments from sh script(remade from etc/init.d/skeleton) to python
[英]/etc/init.d sh script
我是python的新手。 我想创建从/etc/init.d命令(如/etc/init.d)执行的受控脚本,启动/停止/重启
任何建议表示赞赏。
如果您正在寻找用于构建守护程序的模块。 我用了这个: https : //gist.github.com/slor/5946334
Pardus初始化(http://www.pardus.org.tr/eng/projects/comar/SpeedingUpLinuxWithPardus.html)基于python,理论上,您甚至可以使用Windows可执行文件启动系统(当然是通过Wine)。 您可以在其中看到一个示例初始化脚本,该示例初始化脚本与shell脚本几乎相同,但是使用pythonic方式。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.