CC-2754: "airtime-log -d" should create the log file in the current directory
This commit is contained in:
parent
4914cc5d7a
commit
ce993af40a
2 changed files with 10 additions and 7 deletions
|
@ -28,7 +28,4 @@ SCRIPT=`readlink -f $0`
|
|||
# Absolute directory this script is in
|
||||
SCRIPTPATH=`dirname $SCRIPT`
|
||||
|
||||
invokePwd=$PWD
|
||||
cd $SCRIPTPATH
|
||||
|
||||
php -q airtime-log.php "$@" || exit 1
|
||||
php -q $SCRIPTPATH/airtime-log.php "$@" || exit 1
|
||||
|
|
|
@ -43,7 +43,10 @@ function viewSpecificLog($key){
|
|||
|
||||
function dumpAllLogs(){
|
||||
$dateStr = gmdate("Y-m-d-H-i-s");
|
||||
$filename = "/tmp/airtime-log-all-$dateStr.tgz";
|
||||
|
||||
$dir = getcwd();
|
||||
|
||||
$filename = "$dir/airtime-log-all-$dateStr.tgz";
|
||||
echo "Creating Airtime logs tgz file at $filename";
|
||||
$command = "tar cfz $filename /var/log/airtime 2>/dev/null";
|
||||
exec($command);
|
||||
|
@ -54,7 +57,10 @@ function dumpSpecificLog($key){
|
|||
|
||||
if (isKeyValid($key)){
|
||||
$dateStr = gmdate("Y-m-d-H-i-s");
|
||||
$filename = "/tmp/airtime-log-$key-$dateStr.tgz";
|
||||
|
||||
$dir = getcwd();
|
||||
|
||||
$filename = "$dir/airtime-log-$key-$dateStr.tgz";
|
||||
echo "Creating Airtime logs tgz file at $filename";
|
||||
$dir = dirname($log_files[$key]);
|
||||
$command = "tar cfz $filename $dir 2>/dev/null";
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue