Questions tagged «init.d»

init.d目录包含用于Linux系统上各种服务的许多启动/停止脚本。

1
启动时init.d脚本的PATH问题
我有一个简单的脚本(在Ubuntu 12.04LTS上)启动独角兽实例。 #!/bin/sh case "$1" in start) echo "starting" cd /path && bundle exec unicorn -c /path/config/unicorn.rb -D -E production ;; stop) echo "Stopping Unicorn Instances" kill `cat /tmp/unicorn.pid` ;; restart) echo "sending USR2 to all unicorns" kill -s USR2 `cat /tmp/unicorn.pid` ;; esac exit 0 调用时,它的行为正确: /etc/init.d/unicorn_boot.sh start 我希望它在启动时启动,所以我跑了: …
8 ubuntu  init.d  path 

2
使Shell脚本在CentOS上作为守护程序运行?
编辑:由于某种原因,我的帖子一半被截断,不确定发生了什么。我将尽快更新,并将在顶部发布。 编辑:我再次更新了帖子,对不完整的问题表示抱歉。 编辑(美国东部标准时间2011年10月10日晚上8:55):我像史蒂文建议的那样更新了/srv/rhodecode/start.sh,仍然没有喜悦。它继续像这样挂起: [lpeabody@vcs rhodecode]$ sudo /etc/init.d/rhodecode-server start Starting rhodecode-server: 我已经更新了以下脚本以显示更改。 我一生中从未写过shell或bash脚本。我正在尝试在CentOS上安装RhodeCode,并且有Debian和Gentoo的初始化脚本,但没有RedHat / CentOS的初始化脚本,这对我来说太疯狂了。所以我需要写一个,因为我们的服务器环境仅限于运行CentOS5。该项目的源代码可以在Bitbucket上找到。 这个想法是运行带有Celery和RabbitMQ的RhodeCode。这些都是用Python编写的,我使用virtualenv将环境包含在自己的独立虚拟容器中。我在这里有了shell脚本的主意。 我创建了一个名为rhodecode的系统用户,并创建了目录/ var / run / rhodecode,该目录由rhodecode拥有。我还创建了production.ini所在的/ var / www / rhodecode以及/srv/rhodecode/start.sh,所有这些文件均由rhodecode拥有。 权限: [lpeabody@vcs run]$ ll -a /var/run/rhodecode total 12 drwxr-xr-x 2 rhodecode rhodecode 4096 Oct 10 15:57 . drwxr-xr-x 21 root root 4096 Oct 10 …

1
insserv:如果启动,服务foo和bar之间会有一个循环……打破了天赋
有谁知道如何解决Cyber​​power powerpanel for linux软件包中发生的这些初始化错误? 参考:http : //www.cyberpowersystems.com/products/management-software/ppl.html -- 我尝试使用nut代替,但是它有问题,即有效禁用syslog的Debian bug 354429,因此不是选择。 参考:http : //bugs.debian.org/cgi-bin/bugreport.cgi? bug= 354429 输出: root@host:~# aptitude install foo The following NEW packages will be installed: foo python-central{a} The following packages are RECOMMENDED but will NOT be installed: whois 0 packages upgraded, 2 newly installed, 0 to remove …
8 init.d 
By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.