Skip to content

Commit b8012f3

Browse files
author
Philip Mallory
committed
Add a login alert to explain how to access Vagrant's shared directory
1 parent 574774b commit b8012f3

File tree

2 files changed

+13
-1
lines changed

2 files changed

+13
-1
lines changed

vagrant/.vagrantTip.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
2+
The shared directory is located at /vagrant
3+
To access your shared files: cd /vagrant(B

vagrant/pg_config.sh

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
apt-get -qqy update
32
apt-get -qqy install postgresql python-psycopg2
43
apt-get -qqy install python-flask python-sqlalchemy
@@ -11,3 +10,13 @@ su postgres -c 'createuser -dRS vagrant'
1110
su vagrant -c 'createdb'
1211
su vagrant -c 'createdb forum'
1312
su vagrant -c 'psql forum -f /vagrant/forum/forum.sql'
13+
14+
alertAlreadyAdded=$(grep -c "vagrantTip.txt" /home/vagrant/.bashrc)
15+
if [ $alertAlreadyAdded -eq 0 ]
16+
then
17+
echo -e "\n# Print instructions to access vagrant shared directory\ncat /vagrant/.vagrantTip.txt\n" >> /home/vagrant/.bashrc
18+
echo "Shared folder alert added to .bashrc"
19+
else
20+
echo "Shared folder alert already present"
21+
fi
22+

0 commit comments

Comments
 (0)