aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorScott Ullrich <sullrich@pfsense.org>2007-05-23 22:16:35 +0000
committerScott Ullrich <sullrich@pfsense.org>2007-05-23 22:16:35 +0000
commit55d1782d0da4b3e49f4116fff33fe6c4879a98f3 (patch)
tree28f9c8d8abd0cbef89ac490d346c67ffc70e21d5
parent67f018771b785f4bd0c27a6c6fe5ddfb2cca074d (diff)
downloadpfsense-packages-55d1782d0da4b3e49f4116fff33fe6c4879a98f3.tar.gz
pfsense-packages-55d1782d0da4b3e49f4116fff33fe6c4879a98f3.tar.bz2
pfsense-packages-55d1782d0da4b3e49f4116fff33fe6c4879a98f3.zip
Add Dashboard package for 1.2.
-rw-r--r--packages/dashboard/dashboard.inc20
-rw-r--r--packages/dashboard/dashboard.xml29
2 files changed, 49 insertions, 0 deletions
diff --git a/packages/dashboard/dashboard.inc b/packages/dashboard/dashboard.inc
new file mode 100644
index 00000000..fefb8e03
--- /dev/null
+++ b/packages/dashboard/dashboard.inc
@@ -0,0 +1,20 @@
+<?php
+
+function dashboard_install() {
+ global $g, $config;
+ if(!file_exists("/usr/local/www/index.php.before_dashboard")) {
+ /* backup the pre-dashboard index.php file */
+ mwexec("cp /usr/local/www/index.php /usr/local/www/index.php.before_dashboard");
+ }
+ mwexec("tar xzvpf -C /usr/local/www/ /usr/local/pkg/widgets.tgz");
+}
+
+function dashboard_deinstall() {
+ global $g, $config;
+ if(file_exists("/usr/local/www/index.php.before_dashboard")) {
+ /* restore the file prior to the dashboard package installation */
+ mwexec("cp /usr/local/www/index.php.before_dashboard /usr/local/www/index.php");
+ }
+}
+
+?> \ No newline at end of file
diff --git a/packages/dashboard/dashboard.xml b/packages/dashboard/dashboard.xml
new file mode 100644
index 00000000..7f94bc09
--- /dev/null
+++ b/packages/dashboard/dashboard.xml
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<packagegui>
+ <title>Dashboard</title>
+ <name>dashboard</name>
+ <version>0.1</version>
+ <additional_files_needed>
+ <prefix>/usr/local/pkg/</prefix>
+ <chmod>077</chmod>
+ <item>http://www.pfsense.com/packages/config/dashboard/dashboard.inc</item>
+ </additional_files_needed>
+ <additional_files_needed>
+ <prefix>/usr/local/pkg/</prefix>
+ <chmod>077</chmod>
+ <item>http://www.pfsense.com/packages/config/dashboard/binaries/widgets.tgz</item>
+ </additional_files_needed>
+ <custom_php_install_command>
+ dashboard_install();
+ </custom_php_install_command>
+ <custom_add_php_command>
+ </custom_add_php_command>
+ <custom_php_resync_command>
+ </custom_php_resync_command>
+ <custom_php_deinstall_command>
+ dashboard_deinstall();
+ </custom_php_deinstall_command>
+</packagegui>
+
+
+ \ No newline at end of file