lib/deprec/third_party/railsmachine/recipes/apache.rb in deprec-1.1.0 vs lib/deprec/third_party/railsmachine/recipes/apache.rb in deprec-1.2.0
- old
+ new
@@ -23,10 +23,10 @@
# XXX quick hack to permit me to add to file
sudo "chmod 766 #{apache_path}/conf/httpd.conf"
sudo "grep '#{inc_cmd}' #{apache_path}/conf/httpd.conf || sudo echo '#{inc_cmd}' >> #{apache_path}/conf/httpd.conf"
sudo "chmod 755 #{apache_path}/conf/httpd.conf"
index = '/usr/local/apache2/htdocs/index.html'
- sudo "test -f #{index} && sudo mv #{index} #{index}.bak"
+ sudo "test ! -f #{index} || sudo mv #{index} #{index}.bak"
end
desc "Configure Apache. This uses the :use_sudo
variable to determine whether to use sudo or not. By default, :use_sudo is
set to true."
\ No newline at end of file