From fd12957b5b87b842571ead4f6c5521702ae2a285 Mon Sep 17 00:00:00 2001 From: mcrane Date: Thu, 14 May 2009 02:04:20 -0600 Subject: Shellcmd package debut --- config/shellcmd/shellcmd.inc | 124 ++++++++++++++++++++ config/shellcmd/shellcmd.tmp | 231 +++++++++++++++++++++++++++++++++++++ config/shellcmd/shellcmd.xml | 115 +++++++++++++++++++ config/shellcmd/shellcmd_edit.tmp | 236 ++++++++++++++++++++++++++++++++++++++ 4 files changed, 706 insertions(+) create mode 100644 config/shellcmd/shellcmd.inc create mode 100644 config/shellcmd/shellcmd.tmp create mode 100644 config/shellcmd/shellcmd.xml create mode 100644 config/shellcmd/shellcmd_edit.tmp (limited to 'config/shellcmd') diff --git a/config/shellcmd/shellcmd.inc b/config/shellcmd/shellcmd.inc new file mode 100644 index 00000000..76ceeb31 --- /dev/null +++ b/config/shellcmd/shellcmd.inc @@ -0,0 +1,124 @@ + "shellcmd.sh", + // "start" => "/usr/sbin/shellcmd -s &", + // "stop" => "kill -9 `cat /var/run/shellcmd.pid`" + // ) + //); + + php_sync_package(); + + //if (pkg_is_service_running('shellcmd')) { + //documentation purposes + //} + + conf_mount_ro(); + config_unlock(); + +} + + +function deinstall_command() +{ + + conf_mount_rw(); + config_lock(); + $handle = popen("/usr/local/etc/rc.d/shellcmd.sh stop", "r"); + unlink_if_exists("/usr/local/pkg/shellcmd.xml"); + unlink_if_exists("/usr/local/www/shellcmd.inc"); + exec("rm -R /usr/local/www/packages/shellcmd"); + //unlink_if_exists("/usr/local/etc/rc.d/shellcmd.sh"); + conf_mount_ro(); + config_unlock(); + +} + +?> \ No newline at end of file diff --git a/config/shellcmd/shellcmd.tmp b/config/shellcmd/shellcmd.tmp new file mode 100644 index 00000000..66e32c44 --- /dev/null +++ b/config/shellcmd/shellcmd.tmp @@ -0,0 +1,231 @@ + + + + + +

Shellcmd: Settings

+ +
+ + +
+ +
+ + + + + +
+ +
+"; +//print_info_box_np("This is an info box."); +//echo"
"; +//endif; + +?> + + + + +

+ shellcmd controls the commands that are started when the sytems is booted up. +

+ +

+
+ + + + + + + + + + 0) { + foreach ($a_earlyshellcmd as $ent) { + echo " \n"; + echo " \n"; + echo " \n"; + echo " \n"; + echo " "; + $i++; + } + } + + + $i = 0; + if (count($a_shellcmd) > 0) { + foreach ($a_shellcmd as $ent) { + echo " \n"; + echo " \n"; + echo " \n"; + echo " \n"; + echo " "; + $i++; + } + } + + + $i = 0; + if (count($a_afterfilterchangeshellcmd) > 0) { + foreach ($a_afterfilterchangeshellcmd as $ent) { + echo " \n"; + echo " \n"; + echo " \n"; + echo " \n"; + echo " "; + $i++; + } + } +?> + + + + + + + + + + + +
commandtype + + + + + + +
+ +
\n"; + echo " ".$ent['command']." \n"; + echo " \n"; + echo " earlyshellcmd \n"; + echo " \n"; + echo " \n"; + echo " \n"; + echo " \n"; + echo " \n"; + echo " \n"; + echo "
\n"; + echo "
\n"; + echo " ".$ent['command']." \n"; + echo " \n"; + echo " shellcmd \n"; + echo " \n"; + echo " \n"; + echo " \n"; + echo " \n"; + echo " \n"; + echo " \n"; + echo "
\n"; + echo "
\n"; + echo " ".$ent['command']." \n"; + echo " \n"; + echo " afterfilterchangeshellcmd \n"; + echo " \n"; + echo " \n"; + echo " \n"; + echo " \n"; + echo " \n"; + echo " \n"; + echo "
\n"; + echo "
+ + + + + +
+
+ +
+ + +
+
+
+
+
+
+
+
+ +
+ +
+ + + + + diff --git a/config/shellcmd/shellcmd.xml b/config/shellcmd/shellcmd.xml new file mode 100644 index 00000000..7e5af996 --- /dev/null +++ b/config/shellcmd/shellcmd.xml @@ -0,0 +1,115 @@ + + + + + + + + Shellcmd + Describe your package requirements here + Currently there are no FAQ items provided. + Shellcmd Settings + 0.1 + Settings + /usr/local/pkg/shellcmd.inc + + Shellcmd + shellcmd settings. +
Services
+ shellcmd.xml + /packages/shellcmd/shellcmd.php +
+ + + Settings + /pkg_edit.php?xml=shellcmd.xml&id=0 + + + + Settings + /packages/shellcmd.php + + + + installedpackages->package->$packagename->configuration->shellcmd + + /usr/local/pkg/ + 0755 + http://www.pfsense.com/packages/config/shellcmd/shellcmd.xml + + + /usr/local/pkg/ + 0755 + http://www.pfsense.com/packages/config/shellcmd/shellcmd.inc + + + /tmp/ + 0755 + http://www.pfsense.com/packages/config/shellcmd/shellcmd.tmp + + + /tmp/ + 0755 + http://www.pfsense.com/packages/config/shellcmd/shellcmd_edit.tmp + + + + Variable One + var1 + Enter the variable one here. + input + + + Variable Two + var1 + Enter the variable one here. + input + + + + + + php_sync_package(); + + + php_sync_package(); + + + php_install_command(); + + + deinstall_command(); + +
\ No newline at end of file diff --git a/config/shellcmd/shellcmd_edit.tmp b/config/shellcmd/shellcmd_edit.tmp new file mode 100644 index 00000000..904c6008 --- /dev/null +++ b/config/shellcmd/shellcmd_edit.tmp @@ -0,0 +1,236 @@ + + + + + + +

shellcmd: Edit

+ + + +
+ + +
+ +
+ + + + +
+ + +
+ + +
+ + + + + + + + + + + + + + + + + + +
type + \n"; + echo " \n"; + switch (htmlspecialchars($type)) { + case "earlyshellcmd": + echo " \n"; + echo " \n"; + echo " \n"; + break; + case "shellcmd": + echo " \n"; + echo " \n"; + echo " \n"; + break; + case "afterfilterchangeshellcmd": + echo " \n"; + echo " \n"; + echo " \n"; + break; + default: + echo " \n"; + echo " \n"; + echo " \n"; + echo " \n"; + break; + } + echo " \n"; + ?> + +
command + +
  + + + + +
+
+ +
+
+
+
+
+
+ +
+ +
+ + + + -- cgit v1.2.3