Skip to content

Instantly share code, notes, and snippets.

View KieranHayes's full-sized avatar

Kieran Hayes KieranHayes

View GitHub Profile
@KieranHayes
KieranHayes / php.rb
Last active January 18, 2018 22:47
require 'formula'
def mysql_installed?
`which mysql_config`.length > 0
end
class Php < Formula
url 'http://museum.php.net/php5/php-5.2.17.tar.gz'
homepage ''
md5 '04d321d5aeb9d3a051233dbd24220ef1'
#!/bin/bash
### BEGIN INIT INFO
# Provides: thin
# Required-Start: $local_fs $remote_fs
# Required-Stop: $local_fs $remote_fs
# Default-Start: 2 3 4 5
# Default-Stop: S 0 1 6
# Short-Description: thin initscript
# Description: thin
### END INIT INFO
#!/bin/sh
set_path="cd /home/rails/my_app/current"
case "$1" in
start)
echo -n "Starting delayed_job: "
su - rails -c "$set_path; RAILS_ENV=production script/delayed_job start" >> log/delayed_job.log 2>&1
echo "done."
;;
stop)