aboutsummaryrefslogtreecommitdiffstats
path: root/config/asterisk/asterisk_calls.php
diff options
context:
space:
mode:
authornagyrobi <robreg@zsurob.hu>2013-09-23 14:24:04 +0200
committernagyrobi <robreg@zsurob.hu>2013-09-23 14:24:04 +0200
commit318f8871db3f93f5338b60e65ba02c8e93919b74 (patch)
treec4da20daa1e0becd56c453909f2e4ee71aebdb75 /config/asterisk/asterisk_calls.php
parent217ea982c36f6b4a5b0421a0eab9214dba785f75 (diff)
downloadpfsense-packages-318f8871db3f93f5338b60e65ba02c8e93919b74.tar.gz
pfsense-packages-318f8871db3f93f5338b60e65ba02c8e93919b74.tar.bz2
pfsense-packages-318f8871db3f93f5338b60e65ba02c8e93919b74.zip
Update asterisk_calls.php
Trim and Clear should give an infobox now, + chmod and chown correctly set.
Diffstat (limited to 'config/asterisk/asterisk_calls.php')
-rw-r--r--config/asterisk/asterisk_calls.php14
1 files changed, 11 insertions, 3 deletions
diff --git a/config/asterisk/asterisk_calls.php b/config/asterisk/asterisk_calls.php
index 7fd75274..6a4f973e 100644
--- a/config/asterisk/asterisk_calls.php
+++ b/config/asterisk/asterisk_calls.php
@@ -61,11 +61,13 @@ $pfile = $break[count($break) - 1];
if (file_exists($callog))
switch ($cmd){
case "trim":
- $trimres=shell_exec("tail -50 '$callog' > /tmp/trimmed.csv; rm '$callog'; mv /tmp/trimmed.csv '$callog'; chmod 666 '$callog'");
+ $trimres=shell_exec("tail -50 '$callog' > /tmp/trimmed_asterisk.csv && rm '$callog' && mv /tmp/trimmed_asterisk.csv '$callog' && chown asterisk:asterisk '$callog' && chmod g+w '$callog'");
+ header( 'Location: asterisk_calls.php?savemsg=Calls+log+trimmed.') ;
break;
case "clear":
- $trimres=shell_exec("rm '$callog'; touch '$callog'; chmod 666 '$callog'");
+ $trimres=shell_exec("rm '$callog' && touch '$callog' && chown asterisk:asterisk '$callog' && chmod g+w '$callog'");
+ header( 'Location: asterisk_calls.php?savemsg=Calls+log+cleared.') ;
break;
case "download":
@@ -91,6 +93,12 @@ if (file_exists($callog))
<body link="#0000CC" vlink="#0000CC" alink="#0000CC">
<?php include("fbegin.inc"); ?>
+ <?php
+ $savemsg = $_GET["savemsg"];
+ if ($savemsg) {
+ print_info_box($savemsg);
+ }
+ ?>
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td>
@@ -159,7 +167,7 @@ if (file_exists($callog))
<?
if ($g['platform'] == "nanobsd")
- echo "<br>This log is lost when rebooting the system.";
+ echo "<br>This log may be lost when rebooting the system.";
?>