summaryrefslogtreecommitdiff
path: root/webgli
diff options
context:
space:
mode:
authorPreston Cody <codeman@gentoo.org>2006-04-15 20:40:05 +0000
committerPreston Cody <codeman@gentoo.org>2006-04-15 20:40:05 +0000
commit16f9f2e1f5188a67f9f9966bbfdc7da5a0806907 (patch)
treee96c5882fd5da805284cd07404be6236dbfa25cd /webgli
parentadding initial files for configfiles screen (diff)
downloadscire-16f9f2e1f5188a67f9f9966bbfdc7da5a0806907.tar.gz
scire-16f9f2e1f5188a67f9f9966bbfdc7da5a0806907.tar.bz2
scire-16f9f2e1f5188a67f9f9966bbfdc7da5a0806907.zip
adding initial daemon screen
svn path=/; revision=19
Diffstat (limited to 'webgli')
-rw-r--r--webgli/daemons.php49
-rw-r--r--webgli/templates/daemons.tpl31
2 files changed, 80 insertions, 0 deletions
diff --git a/webgli/daemons.php b/webgli/daemons.php
new file mode 100644
index 0000000..e2e9c36
--- /dev/null
+++ b/webgli/daemons.php
@@ -0,0 +1,49 @@
+<?php
+#include('webgliIP.php');
+include('webgliUtility.php');
+
+include('Smarty.class.php');
+$smarty = new Smarty;
+#phpinfo();
+$smarty->template_dir = './templates';
+$smarty->compile_dir = './templates_c';
+$smarty->cache_dir = './cache';
+$smarty->config_dir = './configs';
+
+$error_msg = "";
+if ($_POST['savedaemons']) {
+ if ($_POST['logger']) {
+ #shared_info.install_profile.set_logging_daemon_pkg(None, $_POST['logger'], None)
+ $error_msg .= "ERROR: Could not set logger!<br>\n";
+ }
+ if ($_POST['cron']) {
+ #shared_info.install_profile.set_cron_daemon_pkg(None, $_POST['cron'], None)
+ $error_msg .= "ERROR: Could not set cron daemon!<br>\n";
+ }
+ if ($error_msg == "") {
+ $error_msg = "Values saved successfully";
+ }
+ #SAVE VALUES
+}
+
+#Load profile
+
+#cron = shared_info.install_profile.get_cron_daemon_pkg()
+#logger = shared_info.install_profile.get_logging_daemon_pkg()
+$smarty->assign('cron',$cron);
+$smarty->assign('logger',$logger);
+
+$cron_daemons['vixie-cron'] = "Paul Vixie's cron daemon, fully featured, RECOMMENDED.";
+$cron_daemons['dcron'] = "A cute little cron from Matt Dillon.";
+$cron_daemons['fcron'] = "A scheduler with extended capabilities over cron & anacron.";
+$cron_daemons['none'] = "Don't use a cron daemon. (NOT Recommended!)";
+
+$log_daemons['syslog-ng'] = "An advanced system logger. (default)";
+$log_daemons['metalog'] = "A Highly-configurable system logger.";
+$log_daemons['syslogkd'] = "The traditional set of system logging daemons.";
+
+$smarty->assign('cron_daemons',$cron_daemons);
+$smarty->assign('log_daemons',$log_daemons);
+
+$smarty->display('daemons.tpl');
+?>
diff --git a/webgli/templates/daemons.tpl b/webgli/templates/daemons.tpl
new file mode 100644
index 0000000..57d8485
--- /dev/null
+++ b/webgli/templates/daemons.tpl
@@ -0,0 +1,31 @@
+{include file="header.tpl" title="WebGLI - Daemons", advanced=$advanced}
+<h2>Cron and Logging Daemons:</h2>
+{if $error_msg}
+<br>{$error_msg}<br><br>
+{/if}
+<form name="daemons" method="post" action="" enctype="multipart/form-data">
+<p>Choose which cron daemon to use for your system. While it is possible to not choose a cron daemon and still have a working system, this is NOT recommended and is considered a VERY BAD THING.<br>
+Choose your cron daemon:</p>
+<table width="100%" border="1">
+{foreach item=thiscron from=$cron_daemons key=key}
+ <tr>
+ <td><input name="cron" type="radio" value="{$key}" {if $cron == $key} checked {/if}>{$key}</td>
+ <td>{$thiscron}</td>
+ </tr>
+{/foreach}
+</table>
+<br>
+<hr>
+<p>Choose which logging daemon to use for your system. A logger is required by the Gentoo Manual.<br>
+Choose your logging daemon:</p>
+<table width="100%" border="1">
+{foreach item=thislog from=$log_daemons key=key}
+ <tr>
+ <td><input name="logger" type="radio" value="{$key}" {if $logger == $key} checked {/if}>{$key}</td>
+ <td>{$thislog}</td>
+ </tr>
+{/foreach}
+</table>
+<input type="submit" name="savedaemons" value="Save Daemons">
+</form>
+{include file="bottom.tpl"}