Skip to content

Instantly share code, notes, and snippets.

@matthewriley
Created June 26, 2014 17:53

Revisions

  1. matthewriley created this gist Jun 26, 2014.
    57 changes: 57 additions & 0 deletions coldfusion.sh
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,57 @@
    #!/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
    }