Skip to content

Commit

Permalink
chore: 기존 배포파일 삭제 스크립트 추기ㅏ
Browse files Browse the repository at this point in the history
  • Loading branch information
kimchijinju committed Jul 21, 2024
1 parent 3c94f32 commit 3d4642f
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
4 changes: 4 additions & 0 deletions appspec.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@ hooks:
- location: scripts/stop_server.sh
timeout: 300
runas: ec2-user
BeforeInstall:
- location: scripts/remove_files.sh
timeout: 300
runas: ec2-user
ApplicationStart:
- location: scripts/start_server.sh
timeout: 300
Expand Down
7 changes: 7 additions & 0 deletions scripts/remove_files.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/bin/bash

if [ -d "/home/ec2-user/build" ]; then
rm -rf /home/ec2-user/build/*
else
echo "/home/ec2-user/build directory does not exist."
fi

0 comments on commit 3d4642f

Please sign in to comment.