On 2012-01-05, keith <ke...@scott-land.net> wrote: > Hi, I have build a graylog2 server with obsd 5.0 x64 but can't figure > out how to get the some of the programs to auto start, They all start > when run as root but only the mogod one starts up at boot time. Can > anyone help ? > > if [ -x /etc/rc.d/mongod ]; then > echo -n ' MongoDB'; /etc/rc.d/mongod start > fi
Scripts installed by packages in /etc/rc.d are intended to be started by adding the name to the pkg_scripts variable in rc.conf.local; see rc.d(8) > if [ -x /usr/local/elasticsearch/bin/elasticsearch ]; then > echo -n ' Elasticsearch'; /usr/local/elasticsearch/bin/elasticsearch & > fi > > if [ -x /usr/local/graylog2-server/graylog2-server.jar ]; then > echo -n ' Graylog2-Server'; java > /usr/local/graylog2-server/graylog2-server.jar > fi > > if [ -x /usr/local/graylog2-server/graylog2-server.jar ]; then > echo -n ' Graylog2-Web'; > /usr/local/graylog2-web-interface/script/rails server -e production & > fi > > > I've edited the /root/.profile and have added the path to java to PATH > and also set JAVA_HOME. I can't remember if /root/.profile applies to scripts started from /etc/rc but I would suspect not; try setting these required vars directly in rc.local.