mirror of
https://github.com/xcat2/xcat-core.git
synced 2025-07-23 21:01:09 +00:00
remove temporary cases
This commit is contained in:
@@ -1,26 +0,0 @@
|
||||
start:change_apache_listen_port_flat
|
||||
cmd:netstat -nlp|grep -E "apache2|httpd"
|
||||
check:output =~ 80
|
||||
cmd:lsdef -t site -i httpport -c |awk -F"=" '{print $2}'
|
||||
cmd:/opt/xcat/share/xcat/tools/autotest/testcase/installation/change_http_port.sh
|
||||
cmd:netstat -nlp|grep -E "apache2|httpd"
|
||||
check:output =~ 8899
|
||||
check:rc==0
|
||||
cmd:chdef -t site httpport=8899
|
||||
check:rc==0
|
||||
cmd:lsdef -t site -i httpport -c
|
||||
check:output =~ 8899
|
||||
check:rc==0
|
||||
end
|
||||
|
||||
start:change_apache_listen_port_hierarchy
|
||||
cmd:xdsh $$SN "netstat -nlp|grep -E 'apache2|httpd'"
|
||||
check:output =~ 80
|
||||
cmd:xdsh $$SN "lsdef -t site -i httpport -c |awk -F'=' '{print $2}'"
|
||||
cmd:scp /opt/xcat/share/xcat/tools/autotest/testcase/installation/change_http_port.sh $$SN:/tmp
|
||||
cmd:xdsh $$SN "ls -l /tmp/ |grep change_http_port.sh"
|
||||
cmd:xdsh $$SN "chmod +x /tmp/change_http_port.sh && /tmp/change_http_port.sh"
|
||||
cmd:xdsh $$SN "netstat -nlp|grep -E 'apache2|httpd' |grep 8899"
|
||||
check:output =~ 8899
|
||||
check:rc==0
|
||||
end
|
@@ -1,24 +0,0 @@
|
||||
#!/bin/bash
|
||||
if [ -f "/etc/httpd/conf/httpd.conf" ]; then
|
||||
config="/etc/httpd/conf/httpd.conf"
|
||||
elif [ -f "/etc/apache2/ports.conf" ]; then
|
||||
config="/etc/apache2/ports.conf"
|
||||
elif [ -f "/etc/apache2/listen.conf" ]; then
|
||||
config="/etc/apache2/listen.conf"
|
||||
fi
|
||||
port=`awk -F' ' '/^[Ll]isten / {print $2}' $config`
|
||||
echo "The original httpd port is $port in $config"
|
||||
|
||||
echo "start to change httpd listen port to 8899"
|
||||
sed -i "s/^Listen 80/Listen 8899/g" $config
|
||||
if [ -f "/etc/apache2/sites-enabled/000-default.conf" ]; then
|
||||
sed -i "s/VirtualHost \*:80/VirtualHost \*:8899/g" /etc/apache2/sites-enabled/000-default.conf
|
||||
service apache2 stop
|
||||
sleep 1
|
||||
service apache2 start
|
||||
else
|
||||
service httpd stop
|
||||
sleep 1
|
||||
service httpd start
|
||||
fi
|
||||
exit
|
Reference in New Issue
Block a user