Skip to content

Instantly share code, notes, and snippets.

View khaledmdiab's full-sized avatar

Khaled Diab khaledmdiab

View GitHub Profile
@danmackinlay
danmackinlay / supervisord.sh
Created August 27, 2009 07:07
an init.d script for supervisord
#! /bin/sh
### BEGIN INIT INFO
# Provides: supervisord
# Required-Start: $remote_fs
# Required-Stop: $remote_fs
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Example initscript
# Description: This file should be used to construct scripts to be
# placed in /etc/init.d.
@didip
didip / supervisord-example.conf
Created December 31, 2010 01:44
Example for supervisord conf file
; Sample supervisor config file.
[unix_http_server]
file=/tmp/supervisor.sock ; (the path to the socket file)
;chmod=0700 ; sockef file mode (default 0700)
;chown=nobody:nogroup ; socket file uid:gid owner
;username=user ; (default is no username (open server))
;password=123 ; (default is no password (open server))
;[inet_http_server] ; inet (TCP) server disabled by default
@didip
didip / supervisord-example.conf
Created January 30, 2011 05:10
Example configuration file for supervisord.conf
[unix_http_server]
file=/tmp/supervisor.sock ; path to your socket file
[supervisord]
logfile=/var/log/supervisord/supervisord.log ; supervisord log file
logfile_maxbytes=50MB ; maximum size of logfile before rotation
logfile_backups=10 ; number of backed up logfiles
loglevel=error ; info, debug, warn, trace
pidfile=/var/run/supervisord.pid ; pidfile location
nodaemon=false ; run supervisord as a daemon
@didip
didip / tornado-nginx-example.conf
Created January 30, 2011 05:19
Nginx config example for Tornado
worker_processes 2;
error_log /var/log/nginx/error.log;
pid /var/run/nginx.pid;
events {
worker_connections 1024;
use epoll;
}
@ehazlett
ehazlett / redis.conf
Created February 13, 2012 15:32
Redis supervisor config
[program:redis]
command=/usr/local/bin/redis-server /storage/redis_data/redis.conf
directory=/storage/redis_data
user=root
autostart=false
stopsignal=QUIT
@jamiesun
jamiesun / daemon.py
Created July 12, 2012 10:20
一个python守护进程的例子
#! /usr/bin/env python2.7
#encoding:utf-8
#@description:一个python守护进程的例子
#@tags:python,daemon
import sys
import os
import time
import atexit
from signal import SIGTERM
@solar
solar / init.conf
Created October 16, 2012 07:35
install supervisor
description "supervisord"
start on started sshd
stop on runlevel [!2345]
respawn
exec /usr/bin/supervisord -n -c /etc/supervisord.conf
@solar
solar / install.sh
Created October 16, 2012 10:47
install redis with supervisord
#!/bin/sh
version="2.6.3"
priority="20603"
sudo mkdir -p /var/redis /var/log/redis
curl -sL http://redis.googlecode.com/files/redis-${version}.tar.gz | tar zx
cd redis-${version}/
make
sudo make PREFIX=/usr/local/redis/${version} install
@solar
solar / install.sh
Created October 19, 2012 09:10
install nginx with supervisord
sudo cp ./nginx.repo /etc/yum.repod.d/
sudo yum install nginx
sudo chkconfig nginx off
# add 'daemon off' to /etc/nginx/nginx.conf
sudo cp ./nginx.ini /etc/supervisord.d/
sudo supervisorctl add nginx
@wsargent
wsargent / docker_cheat.md
Last active June 29, 2024 19:32
Docker cheat sheet