Look at LSB init scripts for more information.
Copy to /etc/init.d
:
# replace "$YOUR_SERVICE_NAME" with your service's name (whenever it's not enough obvious)
#!/bin/sh | |
## Inspired by | |
## http://epistrephe.in/2016-09-21/cloudflare-dynamic-dns/ | |
## Load config | |
if [ -L $0 ] | |
then | |
source `readlink -e $0 | sed "s:[^/]*$:config:"` | |
else | |
source `echo $0 | sed "s:[^/]*$:config:"` |
# docker ps |grep data | |
2afa8917717e local_discourse/data:latest "/sbin/boot" 5 minutes ago Up 5 minutes 0.0.0.0:5432->5432/tcp, 0.0.0.0:6379->6379/tcp data | |
I, [2015-04-01T03:12:12.686184 #43] INFO -- : > cd /var/www/discourse && su discourse -c 'bundle exec rake db:migrate' | |
URGENT: could not connect to server: Connection refused | |
Is the server running on host "127.0.0.1" and accepting | |
TCP/IP connections on port 5432? | |
Failed to initialize site default | |
rake aborted! | |
Redis::CannotConnectError: Error connecting to Redis on 127.0.0.1:6379 (Errno::ECONNREFUSED) |
#!/bin/bash | |
# | |
# Settings file for minecraft-init | |
# ================================ | |
# | |
# Make a copy of this file named config | |
# and edit the variables to your needs. | |
# | |
### ChamCode | |
# Name of this server instance |
#!/bin/bash | |
# /etc/init.d/mcl | |
### BEGIN INIT INFO | |
# Provides: minecraft | |
# Required-Start: $local_fs $remote_fs | |
# Required-Stop: $local_fs $remote_fs | |
# Should-Start: $network | |
# Should-Stop: $network | |
# Default-Start: 2 3 4 5 |
Look at LSB init scripts for more information.
Copy to /etc/init.d
:
# replace "$YOUR_SERVICE_NAME" with your service's name (whenever it's not enough obvious)
Download from here:
MD5: 59bab8f71f8c096cd3f72cd73851515d
Rename it to:
#!/bin/bash | |
PATH=/sbin:/usr/sbin:/bin:/usr/bin:/usr/local/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=/usr/local/bin/$NAME # this SHOULD POINT TO where your node executable is | |
This is a guide for the recommended method of installing Ruby.
Learn more about Ruby.
RHEL 6.4 currenly only supports ruby 1.8.7 in the repositories which has been completely dropped. Therefore it's recommended to manage ruby outside of the yum package management and build completely from source.
Install libyaml from source