Skip to content

Instantly share code, notes, and snippets.

View LoicMahieu's full-sized avatar
🙈
🙊

Loïc Mahieu LoicMahieu

🙈
🙊
View GitHub Profile
@LoicMahieu
LoicMahieu / .gitignore
Last active August 29, 2015 14:06
Test
bower_components
node_modules
main-builded.js
vendor/tipped-4.1.6
@LoicMahieu
LoicMahieu / pm2
Last active August 29, 2015 14:04
Logrotate for pm2
/root/.pm2/logs/*.log {
daily
rotate 52
missingok
notifempty
compress
sharedscripts
dateext
dateformat %Y-%m-%d
postrotate
@LoicMahieu
LoicMahieu / jvm.config
Created July 9, 2014 12:53
CF10 jvm.config
#
# VM configuration
#
# Where to find JVM, if {java.home}/jre exists then that JVM is used
# if not then it must be the path to the JRE itself
java.home=/opt/coldfusion10/jre/
application.home=/opt/coldfusion10/cfusion
#
@LoicMahieu
LoicMahieu / monit-wrapper
Last active August 29, 2015 14:03
Monit wrapper
#!/bin/bash
function print {
echo "[$(date)] MONIT-WRAPPER: $1"
}
{
print "Env variables"
env
print "Command: $*"
@LoicMahieu
LoicMahieu / install
Created July 8, 2014 15:10
install cf9
## /etc/init.d/coldfusion
curl https://gist.githubusercontent.com/LoicMahieu/21a7f63f0c3480610dc5/raw/ea99bb325bf221a03afb605ccc3884642279bc3f/coldfusion > /etc/init.d/coldfusion
chmod +x /etc/init.d/coldfusion
## CF9
## /etc/monit/monitrc
curl https://gist.githubusercontent.com/LoicMahieu/9894781/raw/98039f79836b314a6fb47d14b36a5b3241017b72/gistfile1.txt > /etc/monit/monitrc
curl https://gist.githubusercontent.com/LoicMahieu/9894781/raw/041b5b0bc914db69f08c448b6265a95ea6d00227/cf9 > /etc/monit/conf.d/coldfusion
chmod 700 /etc/monit/monitrc
chmod 700 /etc/monit/conf.d/coldfusion
@LoicMahieu
LoicMahieu / install
Last active August 29, 2015 14:03
Install CF10
## /etc/init.d/coldfusion
curl https://gist.githubusercontent.com/LoicMahieu/21a7f63f0c3480610dc5/raw/ea99bb325bf221a03afb605ccc3884642279bc3f/coldfusion > /etc/init.d/coldfusion
chmod +x /etc/init.d/coldfusion
## CF10
## /etc/monit/monitrc
curl https://gist.githubusercontent.com/LoicMahieu/9894781/raw/98039f79836b314a6fb47d14b36a5b3241017b72/gistfile1.txt > /etc/monit/monitrc
curl https://gist.githubusercontent.com/LoicMahieu/9894781/raw/7b08815cacfceecaa478f2a3f02cb603fdbd5b7c/cf10 > /etc/monit/conf.d/coldfusion
curl https://gist.githubusercontent.com/LoicMahieu/49e07e25f9ec12e9d94a/raw/99907ab6445d6c605a1e0f97208ee55f2d142ec0/monit-wrapper > /etc/monit-wrapper
chmod +x /etc/monit-wrapper
@LoicMahieu
LoicMahieu / install
Last active August 29, 2015 14:03
Coldfusion 10 log4j.properties
curl https://gist.githubusercontent.com/LoicMahieu/077317910cf9e78a18d3/raw/b99605d8a55970328f84f87127414bf3529cae3c/log4j.properties > /opt/coldfusion10/cfusion/lib/log4j.properties
@LoicMahieu
LoicMahieu / coldfusion
Created June 30, 2014 12:01
Coldfusion 10 - Logrotate
/opt/coldfusion10/cfusion/logs/*.log {
# Log files are rotated every day.
daily
# If the log file is missing, go on to the next one without issuing an error
# message.
missingok
# Log files are rotated count times before being removed or mailed to the
# address specified in a mail directive.
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "Stmt1397825720000",
"Effect": "Allow",
"Action": [
"s3:*"
],
"Resource": [
check process coldfusion10 with pidfile /var/run/coldfusion10.pid
start program = "/etc/monit-wrapper /etc/init.d/coldfusion restart" with timeout 60 seconds
stop program = "/etc/monit-wrapper /etc/init.d/coldfusion stop"
if failed host localhost port 80
protocol HTTP request "/CFIDE/administrator/index.cfm"
with timeout 45 seconds
then restart