mirror of
https://github.com/smxi/inxi.git
synced 2024-11-17 00:31:19 +00:00
a few bug fixes
This commit is contained in:
parent
e82a2d13a9
commit
07d2d6d760
10
inxi
10
inxi
|
@ -1,7 +1,7 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
########################################################################
|
########################################################################
|
||||||
#### Script Name: inxi
|
#### Script Name: inxi
|
||||||
#### version: 1.0.13-b1
|
#### version: 1.0.13-b2
|
||||||
#### Date: 28 May 2009
|
#### Date: 28 May 2009
|
||||||
########################################################################
|
########################################################################
|
||||||
#### SPECIAL THANKS
|
#### SPECIAL THANKS
|
||||||
|
@ -791,9 +791,8 @@ create_rotate_logfiles()
|
||||||
if [[ ! -d $SCRIPT_DATA_DIR ]];then
|
if [[ ! -d $SCRIPT_DATA_DIR ]];then
|
||||||
mkdir $SCRIPT_DATA_DIR
|
mkdir $SCRIPT_DATA_DIR
|
||||||
fi
|
fi
|
||||||
if [[ ! -f $LOG_FILE ]];then
|
# do the rotation if logfile exists
|
||||||
touch $LOG_FILE
|
if [[ -f $LOG_FILE ]];then
|
||||||
else
|
|
||||||
# copy if present second to third
|
# copy if present second to third
|
||||||
if [[ -f $LOG_FILE_1 ]];then
|
if [[ -f $LOG_FILE_1 ]];then
|
||||||
mv -f $LOG_FILE_1 $LOG_FILE_2
|
mv -f $LOG_FILE_1 $LOG_FILE_2
|
||||||
|
@ -801,6 +800,9 @@ create_rotate_logfiles()
|
||||||
# then copy initial to second
|
# then copy initial to second
|
||||||
mv -f $LOG_FILE $LOG_FILE_1
|
mv -f $LOG_FILE $LOG_FILE_1
|
||||||
fi
|
fi
|
||||||
|
# now create the logfile
|
||||||
|
touch $LOG_FILE
|
||||||
|
# and echo the start data
|
||||||
echo "=========================================================" >> $LOG_FILE
|
echo "=========================================================" >> $LOG_FILE
|
||||||
echo "START $SCRIPT_NAME LOGGING:" >> $LOG_FILE
|
echo "START $SCRIPT_NAME LOGGING:" >> $LOG_FILE
|
||||||
echo "Script started: $( date +%Y-%m-%d-%H:%M:%S )" >> $LOG_FILE
|
echo "Script started: $( date +%Y-%m-%d-%H:%M:%S )" >> $LOG_FILE
|
||||||
|
|
Loading…
Reference in a new issue