- 安装
yum install gcc cd /tmp wget http://developer.axis.com/download/distribution/apps-sys-utils-start-stop-daemon-IR1_9_18-2.tar.gz tar zxf apps-sys-utils-start-stop-daemon-IR1_9_18-2.tar.gz cd apps/sys-utils/start-stop-daemon-IR1_9_18-2/ gcc start-stop-daemon.c -o start-stop-daemon cp start-stop-daemon /usr/local/bin/start-stop-daemon
- 执行实例
start-stop-daemon --start --pidfile /opt/test.pid --m -x /usr/bin/nmap -- -oX /tmp/port_1479803917.xml --scan-delay 100ms -sU -sS -p T:T:21-25,80,110,135,139,443,554,993,1098,1099,1433,1521,2001,3230-3253,3306,3389,4444,4445,8080,9080 -T4 -A 125.74.115.23 125.74.115.22 125.74.115.21 125.74.115.20 125.74.115.19 125.74.115.18 125.74.115.17 125.74.115.16 125.74.115.15 125.74.115.14
- --pidfile pid文件
- --m 尝试创建pid文件
文档:http://man.cx/start-stop-daemon