Created
February 20, 2019 01:20
-
-
Save lachlanagnew/5c40be5adf29de020bbbb38a9b3bf6ff to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
HOME=/home/ubuntu | |
APP=$HOME/App | |
CMD=$APP/app.sh | |
LOG=$HOME/deploy.log | |
pwd >> $LOG | |
cd $APP | |
if [ -f $CMD ] | |
then | |
echo $APP >> $LOG | |
pwd >> $LOG | |
$CMD start | |
/bin/echo "$(date '+%Y-%m-%d %X'): Starting $APPLICATION_NAME" >> $LOG | |
else | |
/bin/echo "$(date '+%Y-%m-%d %X'): $CMD not found." >> $LOG | |
fi | |
/bin/echo "$(date '+%Y-%m-%d %X'): ** Application Start Hook Completed **" >> $LOG |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment