File tree 3 files changed +23
-5
lines changed
3 files changed +23
-5
lines changed Original file line number Diff line number Diff line change @@ -33,7 +33,25 @@ mounts_required.each do |required_folder|
33
33
end
34
34
end
35
35
36
- if !Vagrant ::Util ::Platform . windows?
36
+ module OS
37
+ def OS . windows?
38
+ ( /cygwin|mswin|mingw|bccwin|wince|emx/ =~ RUBY_PLATFORM ) != nil
39
+ end
40
+
41
+ def OS . mac?
42
+ ( /darwin/ =~ RUBY_PLATFORM ) != nil
43
+ end
44
+
45
+ def OS . unix?
46
+ !OS . windows?
47
+ end
48
+
49
+ def OS . linux?
50
+ OS . unix? and not OS . mac?
51
+ end
52
+ end
53
+
54
+ if OS . mac?
37
55
check_plugins [ "vagrant-bindfs" ]
38
56
end
39
57
Original file line number Diff line number Diff line change @@ -22,7 +22,7 @@ apt-get install -y git tig htop smem strace lynx dos2unix 2>&1
22
22
find /vagrant/files -type f -exec dos2unix {} \;
23
23
dos2unix /vagrant/config_php.sh
24
24
dos2unix /vagrant/config_groups.sh
25
- dos2unix /vagrant/config_groups .sh
25
+ dos2unix /vagrant/config_users .sh
26
26
27
27
28
28
# Setup Hosts file
Original file line number Diff line number Diff line change @@ -33,7 +33,7 @@ function vagrant_groups() {
33
33
echo " Remapping existing group ${group_name} from GID ${group_oldGID} to GID ${group_newGID} "
34
34
groupmod -g ${group_newGID} ${group_name}
35
35
echo " Reassigning files and folders associated with old group id to the new one"
36
- $( find / -gid ${group_oldGID} ' !' -type l -exec chgrp ${group_newGID} ' {}' ' ;' 2>&1 | grep -v ' No such file or directory' ) || true
36
+ $( find / -path " /srv/www " -prune -o - gid ${group_oldGID} ' !' -type l -exec chgrp ${group_newGID} ' {}' ' ;' 2>&1 | grep -v ' No such file or directory' ) || true
37
37
fi
38
38
done
39
39
}
@@ -81,7 +81,7 @@ function vagrant_users() {
81
81
echo " Remapping existing user ${user_name} from UID ${user_oldUID} to UID ${user_newUID} "
82
82
usermod -u ${user_newUID} ${user_name}
83
83
echo " Reassigning files and folders associated with old user id to the new one"
84
- $( find / -uid ${user_oldUID} ' !' -type l -exec chown ${user_newUID} ' {}' ' ;' 2>&1 | grep -v ' No such file or directory' ) || true
84
+ $( find / -path " /srv/www " -prune -o - uid ${user_oldUID} ' !' -type l -exec chown ${user_newUID} ' {}' ' ;' 2>&1 | grep -v ' No such file or directory' ) || true
85
85
fi
86
86
87
87
if [ $( id -g ${user_name} ) != ${user_newGID} ]; then
@@ -97,7 +97,7 @@ function vagrant_services {
97
97
local i
98
98
local services
99
99
100
- services=(' apache2 mysql redis-server varnish' )
100
+ services=(' apache2 redis-server varnish' )
101
101
arr=(${services// / } )
102
102
for i in " ${arr[@]} " ; do
103
103
sudo service ${i} ${1} || true
You can’t perform that action at this time.
0 commit comments