Prepare /arch for quicksilver
Change-Id: I7762616519eebff0416d5c57a898592b156f8db7
Signed-off-by: Christopher Guindon <chris.guindon@eclipse-foundation.org>
diff --git a/content/en_etcpasswd.php b/content/en_etcpasswd.php
new file mode 100644
index 0000000..28f0d24
--- /dev/null
+++ b/content/en_etcpasswd.php
@@ -0,0 +1,25 @@
+<?php
+/**
+ * Copyright (c) 2013, 2018 Eclipse Foundation and others.
+ *
+ * This program and the accompanying materials are made
+ * available under the terms of the Eclipse Public License 2.0
+ * which is available at https://www.eclipse.org/legal/epl-2.0/
+ *
+ * Contributors:
+ * Denis Roy (Eclipse Foundation)- initial API and implementation
+ * Christopher Guindon (Eclipse Foundation)
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ */
+?>
+
+<div class="col-xs-24">
+ <h1><?php print $pageTitle;?></h1>
+ <h2>What are you searching for?</h2>
+ <p>It appears you're looking for our /etc/passwd file - probably because you want to get access to information in order to h4x0r us.</p>
+ <p>It doesn't contain much... really. A root account, an account for the web server, and the other dozen or so system accounts that are also in your /etc/passwd file. The rest of our account information is stored elsewhere. Darn.</p>
+ <p>So there you go. You can now try attacking us with an SSH brute-force, but our firewalls don't usually put up with that for very long.</p>
+ <br /><br />
+ <p>If you have questions or comments about this message, please e-mail webmaster@@eclipse.org</p>
+</div>
\ No newline at end of file
diff --git a/etcpasswd.php b/etcpasswd.php
index ae4abe0..f01275e 100644
--- a/etcpasswd.php
+++ b/etcpasswd.php
@@ -1,34 +1,27 @@
-<?php require_once($_SERVER['DOCUMENT_ROOT'] . "/eclipse.org-common/system/app.class.php"); require_once($_SERVER['DOCUMENT_ROOT'] . "/eclipse.org-common/system/nav.class.php"); require_once($_SERVER['DOCUMENT_ROOT'] . "/eclipse.org-common/system/menu.class.php"); $App = new App(); $Nav = new Nav(); $Menu = new Menu(); include($App->getProjectCommon()); # All on the same line to unclutter the user's desktop'
-/*******************************************************************************
- * Copyright (c) 2013 Eclipse Foundation and others.
-* All rights reserved. This program and the accompanying materials
-* are made available under the terms of the Eclipse Public License v1.0
-* which accompanies this distribution, and is available at
-* http://www.eclipse.org/legal/epl-v10.html
-*
-* Contributors:
-* Denis Roy (Eclipse Foundation)- initial API and implementation
-*******************************************************************************/
+<?php
+/**
+ * Copyright (c) 2013, 2018 Eclipse Foundation and others.
+ *
+ * This program and the accompanying materials are made
+ * available under the terms of the Eclipse Public License 2.0
+ * which is available at https://www.eclipse.org/legal/epl-2.0/
+ *
+ * Contributors:
+ * Denis Roy (Eclipse Foundation)- initial API and implementation
+ * Christopher Guindon (Eclipse Foundation)
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ */
+require_once ($_SERVER['DOCUMENT_ROOT'] . "/eclipse.org-common/system/app.class.php");
- #
- # Begin: page-specific settings. Change these.
- $pageTitle = "Lost?";
- $html = <<<EOHTML
+$App = new App();
+$Theme = $App->getThemeClass();
-<div id="maincontent">
- <div id="midcolumn">
- <h1>$pageTitle</h1>
- <h2>What are you searching for?</h2>
- <p>It appears you're looking for our /etc/passwd file - probably because you want to get access to information in order to h4x0r us.</p>
- <p>It doesn't contain much... really. A root account, an account for the web server, and the other dozen or so system accounts that are also in your /etc/passwd file. The rest of our account information is stored elsewhere. Darn.</p>
- <p>So there you go. You can now try attacking us with an SSH brute-force, but our firewalls don't usually put up with that for very long.</p>
- <br /><br />
- <p>If you have questions or comments about this message, please e-mail webmaster@@eclipse.org</p>
- </div>
-</div>
+$pageTitle = "Lost?";
+$Theme->setPageTitle($pageTitle);
+ob_start();
+include("content/en_" . $App->getScriptName());
+$Theme->setHtml(ob_get_clean());
-EOHTML;
- # Generate the web page
- $App->generatePage($theme, $Menu, $Nav, $pageAuthor, $pageKeywords, $pageTitle, $html);
-?>
\ No newline at end of file
+$Theme->generatePage();
\ No newline at end of file
diff --git a/monitor.php b/monitor.php
index d1a6e0a..54a4eb5 100644
--- a/monitor.php
+++ b/monitor.php
@@ -1,90 +1,141 @@
<?php
-/*******************************************************************************
- * Copyright (c) 2013 Eclipse Foundation and others.
-* All rights reserved. This program and the accompanying materials
-* are made available under the terms of the Eclipse Public License v1.0
-* which accompanies this distribution, and is available at
-* http://www.eclipse.org/legal/epl-v10.html
-*
-* Contributors:
-* Denis Roy (Eclipse Foundation)- initial API and implementation
-*******************************************************************************/
+/**
+ * Copyright (c) 2013, 2018 Eclipse Foundation and others.
+ *
+ * This program and the accompanying materials are made
+ * available under the terms of the Eclipse Public License 2.0
+ * which is available at https://www.eclipse.org/legal/epl-2.0/
+ *
+ * Contributors:
+ * Denis Roy (Eclipse Foundation)- initial API and implementation
+ * Christopher Guindon (Eclipse Foundation)
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ */
- $_DATE = $_GET['date'];
- $_HOUR = $_GET['hour'];
- $_TXKBPS = $_GET['TXKBPS'];
- $_RXKBPS = $_GET['RXKBPS'];
- $_HOSTNAME = $_GET['hostname'];
+$_DATE = $_GET['date'];
+$_HOUR = $_GET['hour'];
+$_TXKBPS = $_GET['TXKBPS'];
+$_RXKBPS = $_GET['RXKBPS'];
+$_HOSTNAME = $_GET['hostname'];
- $_L1 = $_GET['l1'];
- $_L2 = $_GET['l2'];
- $_L3 = $_GET['l3'];
+$_L1 = $_GET['l1'];
+$_L2 = $_GET['l2'];
+$_L3 = $_GET['l3'];
- $_HTTPCONN = $_GET['httpconn'];
- $_RSYNCCONN = $_GET['rsyncconn'];
- $_PSERVERCONN = $_GET['pserverconn'];
+$_HTTPCONN = $_GET['httpconn'];
+$_RSYNCCONN = $_GET['rsyncconn'];
+$_PSERVERCONN = $_GET['pserverconn'];
- $error = "";
+$error = "";
- $valid = array("dev1", "dev2", "dev3",
- "egit", "ecf", "cdt", "mylyn", "ajdt", "birt", "dashboard_opensuse", "foundation", "emft", "asterisk", "dsdp", "corona", "rap", "higgins", "hippfedora", "hippcentos",
- "cdo", "scanserv", "epf", "babel", "xmpp", "torrent", "orion", "orionhub", "maven2", "repo", "news", "m2m", "polarsys", "polarsys_dashboard", "gyrex", "lts1",
- "puppet", "recommenders", "scada", "science", "sonar-vm1", "stardust", "locationtech", "rtsc", "varnish", "varnish2");
- if(!in_array($_HOSTNAME, $valid)) {
- echo "aborting on $_HOSTNAME"; exit;
- }
- $file = fopen("/home/data/common/monitor/bandwdthavg/" . $_HOSTNAME, "w");
+$valid = array(
+ "dev1",
+ "dev2",
+ "dev3",
+ "egit",
+ "ecf",
+ "cdt",
+ "mylyn",
+ "ajdt",
+ "birt",
+ "dashboard_opensuse",
+ "foundation",
+ "emft",
+ "asterisk",
+ "dsdp",
+ "corona",
+ "rap",
+ "higgins",
+ "hippfedora",
+ "hippcentos",
+ "cdo",
+ "scanserv",
+ "epf",
+ "babel",
+ "xmpp",
+ "torrent",
+ "orion",
+ "orionhub",
+ "maven2",
+ "repo",
+ "news",
+ "m2m",
+ "polarsys",
+ "polarsys_dashboard",
+ "gyrex",
+ "lts1",
+ "puppet",
+ "recommenders",
+ "scada",
+ "science",
+ "sonar-vm1",
+ "stardust",
+ "locationtech",
+ "rtsc",
+ "varnish",
+ "varnish2"
+);
- if(!$file) {
- $error .= "Error opening Bandwidth file.\n";
- }
- else {
- fwrite($file, $_DATE . " " . $_HOUR . " " . $_RXKBPS . " " . $_TXKBPS);
- fclose($file);
- }
-
- if($_L1 != "") {
- $file = fopen("/home/data/common/monitor/loadavg/" . $_HOSTNAME, "w");
- if(!$file) {
- $error .= "Error opening Load file.\n";
- }
- else {
- fwrite($file, $_L1 . " " . $_L2 . " " . $_L3);
- fclose($file);
- }
- }
- if($_HTTPCONN != "") {
- $file = fopen("/home/data/common/monitor/apache2/" . $_HOSTNAME, "w");
- if(!$file) {
- $error .= "Error opening Apache file.\n";
- }
- else {
- fwrite($file, $_HTTPCONN);
- fclose($file);
- }
- }
- if($_RSYNCCONN != "") {
- $file = fopen("/home/data/common/monitor/rsyncd/" . $_HOSTNAME, "w");
- if(!$file) {
- $error .= "Error opening RSYNC file.\n";
- }
- else {
- fwrite($file, $_RSYNCCONN);
- fclose($file);
- }
- }
- if($_PSERVERCONN != "") {
- $file = fopen("/home/data/common/monitor/pserver/" . $_HOSTNAME, "w");
- if(!$file) {
- $error .= "Error opening PSERVER file.\n";
- }
- else {
- fwrite($file, $_PSERVERCONN);
- fclose($file);
- }
- }
- if($error != "") {
- echo $error;
- exit($error);
- }
-?>
\ No newline at end of file
+if (!in_array($_HOSTNAME, $valid)) {
+ echo "aborting on $_HOSTNAME";
+ exit();
+}
+
+$file = fopen("/home/data/common/monitor/bandwdthavg/" . $_HOSTNAME, "w");
+if (!$file) {
+ $error .= "Error opening Bandwidth file.\n";
+}
+else {
+ fwrite($file, $_DATE . " " . $_HOUR . " " . $_RXKBPS . " " . $_TXKBPS);
+ fclose($file);
+}
+
+if ($_L1 != "") {
+ $file = fopen("/home/data/common/monitor/loadavg/" . $_HOSTNAME, "w");
+ if (!$file) {
+ $error .= "Error opening Load file.\n";
+ }
+ else {
+ fwrite($file, $_L1 . " " . $_L2 . " " . $_L3);
+ fclose($file);
+ }
+}
+
+if ($_HTTPCONN != "") {
+ $file = fopen("/home/data/common/monitor/apache2/" . $_HOSTNAME, "w");
+ if (!$file) {
+ $error .= "Error opening Apache file.\n";
+ }
+ else {
+ fwrite($file, $_HTTPCONN);
+ fclose($file);
+ }
+}
+
+if ($_RSYNCCONN != "") {
+ $file = fopen("/home/data/common/monitor/rsyncd/" . $_HOSTNAME, "w");
+ if (!$file) {
+ $error .= "Error opening RSYNC file.\n";
+ }
+ else {
+ fwrite($file, $_RSYNCCONN);
+ fclose($file);
+ }
+}
+
+if ($_PSERVERCONN != "") {
+ $file = fopen("/home/data/common/monitor/pserver/" . $_HOSTNAME, "w");
+ if (!$file) {
+ $error .= "Error opening PSERVER file.\n";
+ }
+ else {
+ fwrite($file, $_PSERVERCONN);
+ fclose($file);
+ }
+}
+
+if ($error != "") {
+ echo $error;
+ exit($error);
+}
\ No newline at end of file