Hi Shuaib,
please add this patch for webvz:
On RPM distros /etc/sysconfig/vz-scripts/ is a symbolic link to /etc/vz/conf/
other distro use the /etc/vz/conf/ directory.
See more
http://git.openvz.org/?p=vzctl;a=blob;f=vzctl.spec;h=076ed1d894720e9da567b0e2d7c626824a7ac1bb;hb=164d72740e68f53dfae33e30a8bb68d3618c37f3
Regards,
Thorsten
--
Thorsten Schifferdecker
OpenVZ Poweruser with a swirl
http://debian.systs.org/category/openvz/
diff --git a/app/controllers/configfile_controller.rb b/app/controllers/configfile_controller.rb
index 88dd94e..0919178 100644
--- a/app/controllers/configfile_controller.rb
+++ b/app/controllers/configfile_controller.rb
@@ -27,21 +27,21 @@ class ConfigfileController < ApplicationController
def edit_conf_file
@file_name = params[:conf_name]
- path = "/etc/sysconfig/vz-scripts/[EMAIL PROTECTED]"
+ path = "/etc/vz/conf/[EMAIL PROTECTED]"
cnf = Vps.new
@conf_file = cnf.read_sample_conf_file(path)
end
def delete_conf_file
@file_name = params[:conf_name]
- `rm -rf /etc/sysconfig/vz-scripts/[EMAIL PROTECTED]
+ `rm -rf /etc/vz/conf/[EMAIL PROTECTED]
flash[:notice] = "[EMAIL PROTECTED] configuration file was deleted."
redirect_to :action => :list_conf_file
end
=begin
def validate_conf_file
@file_name = params[:conf_name]
- output = `vzcfgvalidate /etc/sysconfig/vz-scripts/[EMAIL PROTECTED]
+ output = `vzcfgvalidate /etc/vz/conf/[EMAIL PROTECTED]
flash[:notice] = output
redirect_to :action => :list_conf_file
end
diff --git a/app/models/vps.rb b/app/models/vps.rb
index 6fbdebe..416add9 100644
--- a/app/models/vps.rb
+++ b/app/models/vps.rb
@@ -17,7 +17,7 @@ class Vps < ActiveRecord::Base
end
def read_conf_file(vps_id)
- file = File.open("/etc/sysconfig/vz-scripts/#{vps_id}.conf", "r")
+ file = File.open("/etc/vz/conf/#{vps_id}.conf", "r")
extract_values(file)
end
@@ -27,7 +27,7 @@ class Vps < ActiveRecord::Base
end
def write_to_conf_file(name, conf_file)
- new_file = File.open("/etc/sysconfig/vz-scripts/ve-#{name}.conf-sample", "w")
+ new_file = File.open("/etc/vz/conf/ve-#{name}.conf-sample", "w")
for k, v in conf_file
unless k["\n"]
@text = k.to_s+"="+v.to_s
_______________________________________________
Users mailing list
Users@openvz.org
https://openvz.org/mailman/listinfo/users