diff options
author | Colin Smith <colin@pfsense.org> | 2005-06-26 04:12:22 +0000 |
---|---|---|
committer | Colin Smith <colin@pfsense.org> | 2005-06-26 04:12:22 +0000 |
commit | c5a0e86123c75cc9557120d906a0eb6a6535a8ce (patch) | |
tree | b9dcc62e497c3409268712281e0dc5ad25d5d080 /packages/assp.xml | |
parent | 66f4271c3439a4f385d85b4ab5c954445378ce69 (diff) | |
download | pfsense-packages-c5a0e86123c75cc9557120d906a0eb6a6535a8ce.tar.gz pfsense-packages-c5a0e86123c75cc9557120d906a0eb6a6535a8ce.tar.bz2 pfsense-packages-c5a0e86123c75cc9557120d906a0eb6a6535a8ce.zip |
Modify assp to use new service facilities.
Diffstat (limited to 'packages/assp.xml')
-rw-r--r-- | packages/assp.xml | 25 |
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 &\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 &\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> |