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)| ############################## | |
| ### Flags | |
| ############################## | |
| # SMP support. Options: [enable|auto|disable] | |
| -smp | |
| ############################## | |
| ### Emulator Flags | |
| ############################## | |
| # Max Number of process. Default: 262144 |
| #! /bin/sh | |
| # ------------------------------------------------------------------------------ | |
| # SOME INFOS : fairly standard (debian) init script. | |
| # Note that node doesn't create a PID file (hence --make-pidfile) | |
| # has to be run in the background (hence --background) | |
| # and NOT as root (hence --chuid) | |
| # | |
| # MORE INFOS : INIT SCRIPT http://www.debian.org/doc/debian-policy/ch-opersys.html#s-sysvinit | |
| # INIT-INFO RULES http://wiki.debian.org/LSBInitScripts | |
| # INSTALL/REMOVE http://www.debian-administration.org/articles/28 |
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)| # erl arguments | |
| # -pa Dir1 Dir2 ... | |
| # What this does is add specified directories when you run erl. Standard usage below. | |
| # Normally we would add main project ebin directory as well as deps ebin directory. | |
| erl -pa deps/*/ebin ebin | |
| # -smp [enable|auto|disable] | |
| # SMP options. Auto means use enable when SMP is supported. Using auto is recommended! | |
| erl -smp auto |
This gist assumes:
| #!/bin/sh | |
| # Linux Logs and Uses | |
| /var/log/message # General message and system related stuff | |
| /var/log/auth.log # Authenication logs | |
| /var/log/kern.log # Kernel logs | |
| /var/log/cron.log # Crond logs (cron job) | |
| /var/log/maillog # Mail server logs | |
| /var/log/qmail/ # Qmail log directory (more files inside this directory) |
| # rsyslog v5 configuration file | |
| #### MODULES #### | |
| $ModLoad imuxsock # provides support for local system logging (e.g. via logger command) | |
| $ModLoad imklog # provides kernel logging support (previously done by rklogd) | |
| #$ModLoad immark # provides --MARK-- message capability | |
| # Provides UDP syslog reception | |
| $ModLoad imudp |
| /* | |
| * Updated to use the function-based method described in http://www.phpied.com/social-button-bffs/ | |
| * Better handling of scripts without supplied ids. | |
| * | |
| * N.B. Be sure to include Google Analytics's _gaq and Facebook's fbAsyncInit prior to this function. | |
| */ | |
| (function(doc, script) { | |
| var js, | |
| fjs = doc.getElementsByTagName(script)[0], |
| #!/bin/sh | |
| # Setup Repo and Install | |
| echo "deb http://www.rabbitmq.com/debian/ testing main" > /etc/apt/sources.list.d/rabbitmq.list | |
| wget http://www.rabbitmq.com/rabbitmq-signing-key-public.asc | |
| apt-key add rabbitmq-signing-key-public.asc | |
| apt-get update | |
| apt-get install rabbitmq-server -y | |
| service rabbitmq-server start |
| #!/bin/bash | |
| # Add the EPEL repo if not added already | |
| yum repolist | grep -i epel | |
| if [ $? -ne 0 ]; then | |
| rpm -Uvh http://download.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm | |
| fi | |
| # Install the preqs | |
| yum install gcc-c++ httpd python-devel python-pip python-sqlite2 \ |