Chinaunix首页 | 论坛 | 博客
  • 博客访问: 5096049
  • 博文数量: 921
  • 博客积分: 16037
  • 博客等级: 上将
  • 技术积分: 8469
  • 用 户 组: 普通用户
  • 注册时间: 2006-04-05 02:08
文章分类

全部博文(921)

文章存档

2020年(1)

2019年(3)

2018年(3)

2017年(6)

2016年(47)

2015年(72)

2014年(25)

2013年(72)

2012年(125)

2011年(182)

2010年(42)

2009年(14)

2008年(85)

2007年(89)

2006年(155)

分类: LINUX

2015-08-06 14:23:26

CentOS是没有start-stop-daemon的,因为start-stop-daemon在debian的dpkg包里。要安装的话,需要自己折腾。
相关命令如下:


  1. wget http://developer.axis.com/download/distribution/apps-sys-utils-start-stop-daemon-IR1_9_18-2.tar.gz
  2. tar zxf apps-sys-utils-start-stop-daemon-IR1_9_18-2.tar.gz
  3. mv apps/sys-utils/start-stop-daemon-IR1_9_18-2/ ./
  4. rm -rf apps
  5. cd start-stop-daemon-IR1_9_18-2/
  6. cc start-stop-daemon.c -o start-stop-daemon
  7. cp start-stop-daemon /usr/local/bin/start-stop-daemon
至此安装完成。可以看到:


  1. [root@localhost ~]# start-stop-daemon –help
  2. start-stop-daemon 1.9.18 for Debian – small and fast C version written by
  3. Marek Michalkiewicz <marekm@i17linuxb.ists.pwr.wroc.pl>, public domain.
  4. Usage:
  5. start-stop-daemon -S|–start options … — arguments …
  6. start-stop-daemon -K|–stop options …
  7. start-stop-daemon -H|–help
  8. start-stop-daemon -V|–version
  9. Options (at least one of –exec|–pidfile|–user is required):
  10. -x|–exec <executable> program to start/check if it is running
  11. -p|–pidfile <pid-file> pid file to check
  12. -c|–chuid <name|uid[:group|gid]>
  13. change to this user/group before starting process
  14. -u|–user <username>|<uid> stop processes owned by this user
  15. -n|–name <process-name> stop processes with this name
  16. -s|–signal <signal> signal to send (default TERM)
  17. -a|–startas <pathname> program to start (default is <executable>)
  18. -N|–nicelevel <incr> add incr to the process’s nice level
  19. -b|–background force the process to detach
  20. -m|–make-pidfile create the pidfile before starting
  21. -R|–retry <schedule> check whether processes die, and retry
  22. -t|–test test mode, don’t do anything
  23. -o|–oknodo exit status 0 (not 1) if nothing done
  24. -q|–quiet be more quiet
  25. -v|–verbose be more verbose
  26. Retry <schedule> is <item>|/<item>/… where <item> is one of
  27. -<signal-num>|[-]<signal-name> send that signal
  28. <timeout> wait that many seconds
  29. forever repeat remainder forever
  30. or <schedule> may be just <timeout>, meaning <signal>/<timeout>/KILL/<timeout>
  31. Exit status: 0 = done 1 = nothing done (=> 0 if –oknodo)
  32. 3 = trouble 2 = with –retry, processes wouldn’t die
原文链接


阅读(2201) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~