Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[improvement] haste-server initscript #34

Closed
gllmhyt opened this issue Dec 9, 2012 · 3 comments
Closed

[improvement] haste-server initscript #34

gllmhyt opened this issue Dec 9, 2012 · 3 comments

Comments

@gllmhyt
Copy link

gllmhyt commented Dec 9, 2012

I'm running haste-server on a Debian domain, and it's the only thing that's not "reboot-proof". Have anybody worked on an initscript for it ? I tried on myself to work on the etherpad-lite initscript, but it didn't make the trick.

@seejohnrun
Copy link
Contributor

Hmm - I haven't - it shouldn't be too hard though, especially if you're using something like foreman

@gllmhyt
Copy link
Author

gllmhyt commented Mar 17, 2013

I found some initscript here that I edited for a Debian host (I've not done an Arch Linux initscrip yet).

#!/bin/bash

### BEGIN INIT INFO
# Provides:          hastebin
# Required-Start:    $local_fs $remote_fs $network $syslog $redis_server
# Required-Stop:     $local_fs $remote_fs $network $syslog $redis_server
# Default-Start:     2 3 4 5
# Default-Stop:      0 1 6
# Short-Description: starts hastebin
# Description:       starts hastebin
### END INIT INFO

PATH=/sbin:/usr/sbin:/bin:/usr/bin:/usr/local/bin:/opt/node/bin # modify if you need
DAEMON_ARGS="/home/hastebin/haste-server/server.js" # path to your node.js server/app
DESC="node.js pastebin server" # whatever fancy description you like
NODEUSER=hastebin:hastebin # USER who OWNS the daemon process (no matter whoever runs the init script)
LOCAL_VAR_RUN=/var/run # in case the init script is run by non-root user, you need to
NAME=node # name of the node.js executable
DAEMON=/opt/node/bin/$NAME # this SHOULD POINT TO where your node executable is

(...)

Then :

~ # update-rc.d hastebin defaults

It's working like a charm for months now.

@seejohnrun
Copy link
Contributor

@postblue any chance you can add this as a wiki page?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants