Skip to content

Commit

Permalink
Message and error cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
Hazen committed Nov 14, 2017
1 parent 035aad4 commit 1c9837b
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions aliases
Original file line number Diff line number Diff line change
Expand Up @@ -130,29 +130,23 @@ alias lh='ls -lh'
alias ltr='ls -ltr'
alias psg='ps aux | grep'
dynamodbctl() {
if [ $# -ne 1 ]; then
echo "Usage dynamodbctl <start|stop|status>"
fi
cd ~/.dynamodb
case $1 in
start) java -Djava.library.path=./DynamoDBLocal_lib -jar DynamoDBLocal.jar -sharedDb -dbPath . & 2>&1 >> server.log;;
stop) ps aux | grep DynamoDBLocal | grep -v grep | awk '{print $2}' | xargs kill;;
status) ps aux | grep DynamoDBLocal | grep -v grep 2>&1 > /dev/null && echo "Running" || echo "Not running";;
*) echo "Usage dynamodbctl <start|stop|status>" && exit 1;;
*) echo "Usage dynamodbctl <start|stop|status>";;
esac
cd - > /dev/null
}
flaskctl() {
if [ $# -ne 1 ]; then
echo "Usage flaskctl <start|stop|restart|status>"
fi
cd ~/.flask/
case $1 in
start) ./app.py &;;
stop) ps aux | grep "python ./app.py" | grep -v grep | awk '{print $2}' | xargs kill > /dev/null;;
status) ps aux | grep "python ./app.py" | grep -v grep 2>&1 > /dev/null && echo "Running" || echo "Not running";;
restart) ps aux | grep "python ./app.py" | grep -v grep | awk '{print $2}' | xargs kill && ./app.py &;;
*) echo "Usage flaskctl <start|stop|status>" && exit 1;;
*) echo "Usage flaskctl <start|stop|status>";;
esac
cd - > /dev/null
}

0 comments on commit 1c9837b

Please sign in to comment.