File tree Expand file tree Collapse file tree 1 file changed +19
-1
lines changed Expand file tree Collapse file tree 1 file changed +19
-1
lines changed Original file line number Diff line number Diff line change 11#! /bin/bash
22
33PATH=" $( pwd) "
4- INSTALLATION=" /etc/httpd/commands"
4+ HTTP_PATH=" /etc/httpd"
5+ INSTALLATION=" $HTTP_PATH /commands"
56COMPLETIONS_PATH=" /usr/share/bash-completion/completions"
67
78binPath=" /usr/bin"
@@ -26,6 +27,21 @@ function _create_folder {
2627 fi
2728}
2829
30+ function _create_vhost_folder {
31+ vhost=( " sites-enabled" " sites-available" )
32+ for vhost_folder in ${vhost[@]} ; do
33+ local folder=" $HTTP_PATH /$vhost_folder "
34+
35+ if [ ! -d $folder ]; then
36+ /bin/mkdir $verbose " $folder "
37+ else
38+ if [ -z " $verbose " ]; then
39+ echo " The folder \" $folder \" already exists skipping"
40+ fi
41+ fi
42+ done
43+ }
44+
2945function _install_commands {
3046 # Install commands
3147 for file in $( /bin/ls -1 " $PATH /commands/" ) ; do
@@ -38,6 +54,8 @@ function _install_commands {
3854 /bin/install $verbose " $INSTALLATION /$file " " $binPath /$file "
3955 fi
4056 done
57+
58+ _create_vhost_folder
4159}
4260
4361function _set_autocomplete {
You can’t perform that action at this time.
0 commit comments