1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

zsh

Last updated at Posted at 2014-07-20

.zshrc

history

HISTFILE=~/.zsh_history
HISTSIZE=6000000
SAVEHIST=6000000
setopt hist_ignore_dups     # ignore duplication command history list
setopt share_history        # share command history data

confitional expression

case

# ! /bin/zsh

_APP_PATH=~/program/angularjs/logging

case "$1" in
'start')
	ps aux | grep mongod 2>&1 > /dev/null
	if [ $? -ne 0 ]; then
		#/usr/local/bin/mongod
		mongod --fork --quiet --dbpath /usr/local/var/mongodb --logpath /usr/local/var/mongodb/mongod.log
	else
		echo "mongod process already up."
	fi

	${_APP_PATH}/node_modules/forever/bin/forever start ${_APP_PATH}/app.js
	;;
'stop')
	${_APP_PATH}/node_modules/forever/bin/forever stop ${_APP_PATH}/app.js
	;;
'restart')
	${_APP_PATH}/node_modules/forever/bin/forever restart ${_APP_PATH}/app.js
	;;
*)
	echo "Usage: $0 { start | stop }"
	exit 1
	;;
esac
exit 0
1
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?