Skip to content

Instantly share code, notes, and snippets.

View steinfletcher's full-sized avatar

Stein steinfletcher

  • Oxford, United Kingdom
  • 23:02 (UTC +01:00)
View GitHub Profile
@steinfletcher
steinfletcher / mongod
Created February 8, 2014 14:47
Start a program as a service on linux. This example starts the mongo daemon as a service. Put this in /etc/rc.d then execute as "sudo service mongod start"
#! /bin/sh
# Copyright (c) 2014
#
# Author: Stein Fletcher <steinfletcher@gmail.com>
#
# /etc/rc.d/mongod
#
MONGOD_BIN=/usr/local/bin/mongod
test -x $MONGOD_BIN || exit 5