Fix bug.
This commit is contained in:
parent
f19ce221ae
commit
d1f3124ae4
|
@ -35,7 +35,7 @@ namespace :create_site do
|
||||||
update_infos("setting nginx for #{args.site_name}")
|
update_infos("setting nginx for #{args.site_name}")
|
||||||
nginx_setting_texts = @site_construct.generate_nginx_text
|
nginx_setting_texts = @site_construct.generate_nginx_text
|
||||||
exec_ssh_command_by_sudo_for_create(ssh,"touch /etc/nginx/orbit_sites/#{@site_construct.get_site_name}")
|
exec_ssh_command_by_sudo_for_create(ssh,"touch /etc/nginx/orbit_sites/#{@site_construct.get_site_name}")
|
||||||
exec_ssh_command_by_sudo_for_create(ssh,"sh -c \"echo '#{nginx_setting_texts.gsub('$','\\$').gsub(/'{1,3}/,"\"\'\"")}' > /etc/nginx/orbit_sites/#{@site_construct.get_site_name}\"")
|
exec_ssh_command_by_sudo_for_create(ssh,"sh -c \"echo '#{nginx_setting_texts.gsub(/'{1,3}/,"\"\'\"")}' > /etc/nginx/orbit_sites/#{@site_construct.get_site_name}\"")
|
||||||
update_infos("restarting nginx")
|
update_infos("restarting nginx")
|
||||||
exec_ssh_command_by_sudo_for_create(ssh,"sudo -p 'sudo password:' service nginx restart")
|
exec_ssh_command_by_sudo_for_create(ssh,"sudo -p 'sudo password:' service nginx restart")
|
||||||
update_infos("finish restarting nginx")
|
update_infos("finish restarting nginx")
|
||||||
|
|
|
@ -33,7 +33,7 @@ namespace :create_site do
|
||||||
update_infos("setting nginx for #{args.site_name}")
|
update_infos("setting nginx for #{args.site_name}")
|
||||||
nginx_setting_texts = @site_construct.generate_nginx_text
|
nginx_setting_texts = @site_construct.generate_nginx_text
|
||||||
exec_ssh_command_by_sudo_for_create(ssh,"touch /etc/nginx/orbit_sites/#{@site_construct.get_site_name}")
|
exec_ssh_command_by_sudo_for_create(ssh,"touch /etc/nginx/orbit_sites/#{@site_construct.get_site_name}")
|
||||||
exec_ssh_command_by_sudo_for_create(ssh,"sh -c \"echo '#{nginx_setting_texts.gsub('$','\\$').gsub(/'{1,3}/,"\"\'\"")}' > /etc/nginx/orbit_sites/#{@site_construct.get_site_name}\"")
|
exec_ssh_command_by_sudo_for_create(ssh,"sh -c \"echo '#{nginx_setting_texts.gsub(/'{1,3}/,"\"\'\"")}' > /etc/nginx/orbit_sites/#{@site_construct.get_site_name}\"")
|
||||||
update_infos("restarting nginx")
|
update_infos("restarting nginx")
|
||||||
exec_ssh_command_by_sudo_for_create(ssh,"sudo -p 'sudo password:' service nginx restart")
|
exec_ssh_command_by_sudo_for_create(ssh,"sudo -p 'sudo password:' service nginx restart")
|
||||||
update_infos("finish restarting nginx")
|
update_infos("finish restarting nginx")
|
||||||
|
|
Loading…
Reference in New Issue