Skip to content

Instantly share code, notes, and snippets.

@matthewriley
Created June 26, 2014 17:53
Show Gist options
  • Save matthewriley/b895adeced7ca394dba1 to your computer and use it in GitHub Desktop.
Save matthewriley/b895adeced7ca394dba1 to your computer and use it in GitHub Desktop.
OS X Terminal control scripts for ColdFusion 11
#!/usr/bin/env bash
#
# OS X Terminal control scripts for ColdFusion 11.
#
# Licensed under the Apache License, Version v2.0
# http://www.apache.org/licenses/LICENSE-2.0
#
# Usage:
#
# *) $ cfstart [instance name - optional]
# *) $ cfstop [instance name - optional]
# *) $ cfstatus [instance name - optional]
# *) $ cfrestart [instance name - optional]
#
# To use this file:
#
# 1) Copy this file to somewhere (e.g. ~/.coldfusion.sh).
# 2) Add the following line to your .bashrc:
# source ~/.coldfusion.sh
# 3) Restart your Terminal
#
function cfstart() {
if [ -n "$1" ]
then
/Applications/ColdFusion11/$1/bin/coldfusion start
else
/Applications/ColdFusion11/cfusion/bin/coldfusion start
fi
}
function cfstop() {
if [ -n "$1" ]
then
/Applications/ColdFusion11/$1/bin/coldfusion stop
else
/Applications/ColdFusion11/cfusion/bin/coldfusion stop
fi
}
function cfstatus() {
if [ -n "$1" ]
then
/Applications/ColdFusion11/$1/bin/coldfusion status
else
/Applications/ColdFusion11/cfusion/bin/coldfusion status
fi
}
function cfrestart() {
if [ -n "$1" ]
then
/Applications/ColdFusion11/$1/bin/coldfusion restart
else
/Applications/ColdFusion11/cfusion/bin/coldfusion restart
fi
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment