daily pastebin goal
47%
SHARE
TWEET

Untitled

a guest Aug 18th, 2018 52 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #!/usr/bin/env bash
  2. SCRIPT_DIR=$(cd $(dirname ${BASH_SOURCE:-$0}); pwd)
  3.  
  4. pushd $SCRIPT_DIR >/dev/null
  5.  
  6. DB_HOST=$(aws ec2 describe-instances --output text \
  7.   --filter Name=tag:Name,Values=precon \
  8.   --query Reservations[].Instances[].PublicIpAddress)
  9. if [ "" = "$DB_HOST" ]; then
  10.   zenity --error --text='DBサーバーのパブリックIPアドレスを取得できません'
  11.   exit 1
  12. fi
  13. sed -i s/^DB_HOST=.*\$/DB_HOST=$DB_HOST/ $SCRIPT_DIR/.env
  14. php $SCRIPT_DIR/artisan serve
  15.  
  16. popd >/dev/null
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top