File tree Expand file tree Collapse file tree 1 file changed +21
-3
lines changed
Expand file tree Collapse file tree 1 file changed +21
-3
lines changed Original file line number Diff line number Diff line change @@ -24,6 +24,21 @@ function check_apache(){
2424 fi
2525}
2626
27+ function check_www(){
28+
29+ # check if directory exist
30+ if [ -d " /var/www/" ]; then
31+ echo " Contents of /var/www/ will be removed."
32+ read -p " Do you want to continue? [Y/n] "
33+
34+ if [[ $REPLY =~ ^[Yy]$ ]]; then
35+ rm -rf /var/www/
36+ else
37+ exit
38+ fi
39+ fi
40+ }
41+
2742function install_cron(){
2843
2944 # brackets = list of commands to be executed as one unit
@@ -51,12 +66,15 @@ function install_composer(){
5166 alias composer=' php -d suhosin.executor.include.whitelist=phar /usr/local/bin/composer'
5267}
5368
54- # # fresh installations may need to update package locations
55- update
56-
5769# should we even run this script?
5870check_apache
5971
72+ # does /var/www/ already exist?
73+ check_www
74+
75+ # # fresh installations may need to update package locations
76+ update
77+
6078# # git for composer and bc for math operations - vnstat for bandwidth
6179apt-get -y install git bc curl vnstat
6280
You can’t perform that action at this time.
0 commit comments