aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--packages/assp.xml25
1 files changed, 13 insertions, 12 deletions
diff --git a/packages/assp.xml b/packages/assp.xml
index fb02c51c..a5780476 100644
--- a/packages/assp.xml
+++ b/packages/assp.xml
@@ -10,24 +10,25 @@
<url>http://$myurl:55555</url>
<section>Services</section>
</menu>
+ <service>
+ <name>assp</name>
+ <rcfile>assp.sh</rcfile>
+ <executable>assp</executable>
+ </service>
<additional_files_needed>
<item>http://www.pfsense.com/packages/All/assp-1.0.tgz</item>
</additional_files_needed>
<custom_php_install_command>
- $fout = fopen("/usr/local/etc/rc.d/assp.sh","w");
- fwrite($fout, "#!/bin/sh\n\n");
- fwrite($fout, "# PACKAGE: assp\n");
- fwrite($fout, "# EXECUTABLE: assp\n");
- fwrite($fout, "# This file was automatically generated by the pfSense\n");
- fwrite($fout, "# package management system\n\n");
- fwrite($fout, "/usr/bin/perl /usr/local/assp/assp.pl &amp;\n\n");
- fclose($fout);
- chmod("/usr/local/etc/rc.d/assp.sh", 0755);
- mwexec_bg("/usr/local/etc/rc.d/assp.sh");
- echo "ASSP is now installed. You can access it from the left hand menu.";
+ $start = "/usr/bin/perl /usr/local/assp/assp.pl &amp;\necho $! > /var/run/assp.pid";
+ write_rcfile(array(
+ "file" => 'assp.sh',
+ "start" => $start,
+ "stop" => '/usr/bin/kill `cat /var/run/assp.pid`'
+ )
+ );
+ start_service("assp");
</custom_php_install_command>
<custom_php_deinstall_command>
rmdir_recursive("/usr/local/assp");
- unlink_if_exists("/usr/local/etc/rc.d/assp.sh");
</custom_php_deinstall_command>
</packagegui>