Skip to content

Instantly share code, notes, and snippets.

@alecthegeek
Created June 28, 2013 22:26
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save alecthegeek/5888647 to your computer and use it in GitHub Desktop.
Save alecthegeek/5888647 to your computer and use it in GitHub Desktop.
Start and Stop commands for PaperCut
#! /usr/bin/env bash
if [[ -x /Applications/PaperCut\ MF/server/bin/mac/server-command &&
-x /Applications/PaperCut\ NG/server/bin/mac/server-command ]] ; then
echo copies of both NG and MF installed!
exit 1
elif [[ -x /Applications/PaperCut\ MF/server/bin/mac/server-command ]]; then
app_root='/Applications/PaperCut MF'
elif [[ -x /Applications/PaperCut\ NG/server/bin/mac/server-command ]]; then
app_root='/Applications/PaperCut NG'
else
echo PaperCut not installed correctly!
exit 1
fi
if [[ $1 == start ]]; then
"${app_root}/server/bin/mac/start-server.command"
elif [[ $1 == stop ]]; then
"${app_root}/server/bin/mac/stop-server.command"
else
"${app_root}/server/bin/mac/server-command" "$@"
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment