File tree 1 file changed +19
-1
lines changed
1 file changed +19
-1
lines changed Original file line number Diff line number Diff line change 1
1
#! /bin/bash
2
2
3
3
PATH=" $( pwd) "
4
- INSTALLATION=" /etc/httpd/commands"
4
+ HTTP_PATH=" /etc/httpd"
5
+ INSTALLATION=" $HTTP_PATH /commands"
5
6
COMPLETIONS_PATH=" /usr/share/bash-completion/completions"
6
7
7
8
binPath=" /usr/bin"
@@ -26,6 +27,21 @@ function _create_folder {
26
27
fi
27
28
}
28
29
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
+
29
45
function _install_commands {
30
46
# Install commands
31
47
for file in $( /bin/ls -1 " $PATH /commands/" ) ; do
@@ -38,6 +54,8 @@ function _install_commands {
38
54
/bin/install $verbose " $INSTALLATION /$file " " $binPath /$file "
39
55
fi
40
56
done
57
+
58
+ _create_vhost_folder
41
59
}
42
60
43
61
function _set_autocomplete {
You can’t perform that action at this time.
0 commit comments