Whipped up an OpenRC script for Ghost. Feel free to use it for yourself.
Things to be aware of:
- The script was designed for Funtoo.
- The script expects Ghost to be in
$GHOST_ROOT. - The script runs Ghost as
$GHOST_USER:$GHOST_GROUP. - The script exports the
$NODE_ENVtoproduction.
#!/sbin/runscript
# PATH should only include /usr/* if it runs after the mountnfs.sh script
PATH=/sbin:/usr/sbin:/bin:/usr/bin
DESC="Ghost"
NAME=ghost
GHOST_ROOT=/var/ghost
GHOST_GROUP=ghost
GHOST_USER=ghost
DAEMON=/usr/bin/node
DAEMON_ARGS="/index.js"
PIDFILE=/var/run/.pid
SCRIPTNAME=/etc/init.d/