aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorColin Smith <colin@pfsense.org>2005-06-22 02:50:40 +0000
committerColin Smith <colin@pfsense.org>2005-06-22 02:50:40 +0000
commit91be58775b2ba8d0a600f948fa47fa0fd9e44b35 (patch)
treeac2b5bc209cbc1c5a6866de7090a55dcc4677d44
parentcc92c65f0f4fb0eb4e56417db952eb7169d8491d (diff)
downloadpfsense-packages-91be58775b2ba8d0a600f948fa47fa0fd9e44b35.tar.gz
pfsense-packages-91be58775b2ba8d0a600f948fa47fa0fd9e44b35.tar.bz2
pfsense-packages-91be58775b2ba8d0a600f948fa47fa0fd9e44b35.zip
Service tweaks.
-rw-r--r--packages/freeradius.xml16
1 files changed, 6 insertions, 10 deletions
diff --git a/packages/freeradius.xml b/packages/freeradius.xml
index 7f2a0232..d781c6f1 100644
--- a/packages/freeradius.xml
+++ b/packages/freeradius.xml
@@ -13,8 +13,6 @@
<file>/usr/local/etc/rc.d/freeradius.sh</file>
<description>FreeRADIUS daemon</description>
<rcfile>radiusd.sh</rcfile>
- <startcmd>/usr/local/sbin/radiusd -X -d /usr/local/etc/raddb &amp;</startcmd>
- <stopcmd>killall radiusd</stopcmd>
</service>
<tabs>
<tab>
@@ -79,17 +77,15 @@
$fout = fopen("/usr/local/etc/raddb/clients.conf","w");
fwrite($fout, "client 127.0.0.1" . "{\n" . "secret = pfsense\n" . "shortname = localhost\n}\n\n");
fclose($fout);
- unlink_if_exists("/usr/local/etc/rc.d/radiusd*");
- $fout = fopen("/usr/local/etc/rc.d/radiusd.sh","w");
- fwrite($fout, "# PACKAGE: FreeRadius\n");
- fwrite($fout, "# EXECUTABLE: radiusd\n");
- fwrite($fout,"#!/bin/sh\n\n/usr/local/sbin/radiusd -X -d /usr/local/etc/raddb &amp;\n");
- fclose($fout);
+ write_rcfile(array(
+ "file" => "radiusd.sh",
+ "start" => "/usr/local/sbin/radiusd -X -d /usr/local/etc/raddb &amp;",
+ "stop" => "/usr/bin/killall radiusd"
+ )
+ );
$fout = fopen("/usr/local/etc/radiusd.conf.dynamic","w");
fwrite($fout, "{\nipaddr = 127.0.0.1\nport = 0\ntype = auth\n}\n\n");
fclose($fout);
- chmod("/usr/local/etc/rc.d/radiusd.sh", 0755);
- mwexec("/usr/local/etc/rc.d/radiusd.sh");
</custom_php_install_command>
<custom_php_command_before_form>
function sync_package_freeradius() {