Skip to content

Commit 3ef3182

Browse files
committed
Clean up /tmp/myweb on BeforeInstall
1 parent 5edbf44 commit 3ef3182

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

scripts/before_install.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
#!/bin/bash
22

3+
# Install Apache on Amazon Linux or Ubuntu (only if not previously installed)
34
if which yum &>/dev/null; then
45
yum update -y
56
yum install -y httpd
@@ -14,3 +15,6 @@ elif which apt-get &>/dev/null; then
1415
echo "apache2 already installed, skipping!"
1516
fi
1617
fi
18+
19+
# Make sure /tmp/myweb doesn't exist so that the test in AfterInstall is really valid
20+
[ -d /tmp/myweb ] && rm -Rf /tmp/myweb

0 commit comments

Comments
 (0)