File tree 3 files changed +15
-7
lines changed
3 files changed +15
-7
lines changed Original file line number Diff line number Diff line change @@ -113,6 +113,12 @@ Vagrant.configure(2) do |config|
113
113
sudo chmod a+x /bin/better_ps1
114
114
sudo cp /vagrant/bootstrap/better_ps1.sh /bin/better_ps1
115
115
sudo sed -i 's/\r //' /bin/better_ps1
116
+
117
+ # Lazy `runserver`. Really to circumvent permission issue for port 80.
118
+ sudo touch /bin/startserver
119
+ sudo chmod a+x /bin/startserver
120
+ sudo cp /vagrant/bootstrap/startserver.sh /bin/startserver
121
+ sudo sed -i 's/\r //' /bin/startserver
116
122
117
123
# run script to quickly add Python/Django environments
118
124
sudo touch /bin/init_python_env
Original file line number Diff line number Diff line change @@ -73,11 +73,5 @@ echo 'VIRTUALENVWRAPPER_VIRTUALENV=/usr/bin/virtualenv' >> /etc/bash.bashrc
73
73
echo " SYNC_FOLDER=${1%/ } " >> /etc/bash.bashrc
74
74
echo " export SYNC_FOLDER=${1%/ } " >> /etc/bash.bashrc
75
75
76
-
77
- # Lazy start server
78
- touch /bin/startserver
79
- chmod +x /bin/startserver
80
- echo " python manage.py runserver [::]:$2 " >> /bin/startserver
81
-
82
76
# Reload system environment variables so they are immediately available.
83
- source /etc/bash.bashrc
77
+ source /etc/bash.bashrc
Original file line number Diff line number Diff line change
1
+ #! /bin/bash
2
+ source /bin/colors
3
+
4
+ if [ ! -f $PWD /manage.py ]; then
5
+ echo -e ${BRED} Navigate to a Django Project folder first! ${NIL}
6
+ else
7
+ sudo $PWD /bin/python manage.py runserver [::]:80
8
+ fi
You can’t perform that action at this time.
0 commit comments