Skip to Content.
Sympa Menu

ndt-dev - [ndt-dev] [ndt] r1116 committed - Add an RPM to use Apache instead of fakewww

Subject: NDT-DEV email list created

List archive

[ndt-dev] [ndt] r1116 committed - Add an RPM to use Apache instead of fakewww


Chronological Thread 
  • From:
  • To:
  • Subject: [ndt-dev] [ndt] r1116 committed - Add an RPM to use Apache instead of fakewww
  • Date: Fri, 27 Jun 2014 13:41:57 +0000

Revision: 1116
Author:

Date: Fri Jun 27 13:41:49 2014 UTC
Log: Add an RPM to use Apache instead of fakewww


http://code.google.com/p/ndt/source/detail?r=1116

Added:
/trunk/conf/apache-ndt.conf
/trunk/conf/manage_fakewww_usage
Deleted:
/trunk/contrib/apache-ndt.conf
Modified:
/trunk/conf/Makefile.am
/trunk/ndt.spec

=======================================
--- /dev/null
+++ /trunk/conf/apache-ndt.conf Fri Jun 27 13:41:49 2014 UTC
@@ -0,0 +1,18 @@
+Listen 7123
+NameVirtualHost *:7123
+<VirtualHost *:7123>
+ DocumentRoot /usr/ndt
+ <Directory /usr/ndt>
+ DirectoryIndex tcpbw100.html
+ AllowOverride None
+ </Directory>
+
+ ErrorLog /var/log/ndt/httpd_error.log
+
+ # Possible values include: debug, info, notice, warn, error, crit,
+ # alert, emerg.
+ LogLevel warn
+
+ CustomLog /var/log/ndt/httpd_access.log combined
+ ServerSignature On
+</VirtualHost>
=======================================
--- /dev/null
+++ /trunk/conf/manage_fakewww_usage Fri Jun 27 13:41:49 2014 UTC
@@ -0,0 +1,33 @@
+#!/bin/bash
+#
+# Enable or disable fakewww usage
+#
+
+
+COMMAND=$1
+
+if [ "$COMMAND" != "enable" -a "$COMMAND" != "disable" ]; then
+ echo "Acceptable fakewww options are 'enable' and 'disable'"
+ exit -1
+fi
+
+VALUE=0
+if [ "$COMMAND" == "enable" ]; then
+ VALUE=1
+fi
+
+RESTART_SERVICE=0
+
+service ndt status &> /dev/null
+if [ $? == 0 ]; then
+ RESTART_SERVICE=1
+ service ndt stop
+fi
+
+sed -i "s|^USE_FAKEWWW.*|USE_FAKEWWW='${VALUE}'|" /etc/sysconfig/ndt
+
+if [ $RESTART_SERVICE == 1 ]; then
+ service ndt start
+fi
+
+exit 0
=======================================
--- /trunk/contrib/apache-ndt.conf Tue Apr 23 12:06:09 2013 UTC
+++ /dev/null
@@ -1,18 +0,0 @@
-Listen 7123
-NameVirtualHost *:7123
-<VirtualHost *:7123>
- DocumentRoot /usr/ndt
- <Directory /usr/ndt>
- DirectoryIndex tcpbw100.html
- AllowOverride None
- </Directory>
-
- ErrorLog /var/log/ndt/httpd_error.log
-
- # Possible values include: debug, info, notice, warn, error, crit,
- # alert, emerg.
- LogLevel warn
-
- CustomLog /var/log/ndt/httpd_access.log combined
- ServerSignature On
-</VirtualHost>
=======================================
--- /trunk/conf/Makefile.am Fri Jun 20 14:26:21 2014 UTC
+++ /trunk/conf/Makefile.am Fri Jun 27 13:41:49 2014 UTC
@@ -16,5 +16,5 @@
# Description: constructing ndt conf files from templates
# This doesn't really do this yet - it just provides
# examples.
-noinst_DATA = ndt.conf create-html.sh start.ndt ndt autostart.sh ndt-init ndt-logrotate ndt-sysconfig tcpbw100.default.html
+noinst_DATA = ndt.conf create-html.sh start.ndt ndt autostart.sh ndt-init ndt-logrotate ndt-sysconfig tcpbw100.default.html ndt-apache.conf manage_fakewww_usage
EXTRA_DIST = $(noinst_DATA)
=======================================
--- /trunk/ndt.spec Wed Jun 25 17:56:39 2014 UTC
+++ /trunk/ndt.spec Fri Jun 27 13:41:49 2014 UTC
@@ -41,9 +41,18 @@
Requires: I2util, chkconfig, initscripts, shadow-utils, coreutils
Requires: web100_userland, libpcap
Requires: jansson
+
%description server
NDT server that enables end users to run performance tests

+%package server-apache
+Summary: NDT server apache configuration
+Group: Applications/Network
+Requires: httpd, ndt-server
+
+%description server-apache
+Removes NDT's usage of fakewww, and uses Apache to serve NDT's web page and
+Java applet.

%prep
%setup -q -n %{name}-%{version}%{?rc_tag}
@@ -63,10 +72,13 @@
make install DESTDIR=$RPM_BUILD_ROOT

%{__install} -D -m 0755 conf/ndt-init %{buildroot}%{_initrddir}/%{name}
+%{__install} -D -m 0755 conf/ndt-apache.conf %{buildroot}%{_sysconfdir}/httpd/conf.d/%{name}.conf
%{__install} -D -m 0644 conf/ndt-sysconfig %{buildroot}%{_sysconfdir}/sysconfig/%{name}
%{__install} -D -m 0644 conf/ndt-logrotate %{buildroot}%{_sysconfdir}/logrotate.d/%{name}
%{__install} -D -m 0755 conf/tcpbw100.default.html %{buildroot}%{_prefix}/%{name}/tcpbw100.html

+%{__install} -D -m 0755 conf/manage_fakewww_usage %{buildroot}%{_prefix}/%{name}/manage_fakewww_usage
+
%{__mkdir} -p %{buildroot}%{_localstatedir}/lib/%{name}
%{__mkdir} -p %{buildroot}%{_localstatedir}/log/%{name}

@@ -86,6 +98,12 @@
/sbin/chkconfig --del %{name} || :
fi

+%post server-apache
+%{_prefix}/%{name}/manage_fakewww_usage disable
+
+%preun server-apache
+%{_prefix}/%{name}/manage_fakewww_usage enable
+
%files

%files server
@@ -109,6 +127,9 @@
%{_bindir}/tr-mkmap
%{_bindir}/viewtrace

+%files server-apache
+%{_sysconfdir}/httpd/conf.d/%{name}.conf
+
%files client
%defattr(-,root,root,-)
%{_mandir}/man1/web100clt.1.gz


  • [ndt-dev] [ndt] r1116 committed - Add an RPM to use Apache instead of fakewww, ndt, 06/27/2014

Archive powered by MHonArc 2.6.16.

Top of Page