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
|
||||
########################################################################
|
||||
#### Script Name: inxi
|
||||
#### version: 1.0.13-b1
|
||||
#### version: 1.0.13-b2
|
||||
#### Date: 28 May 2009
|
||||
########################################################################
|
||||
#### SPECIAL THANKS
|
||||
|
@ -791,9 +791,8 @@ create_rotate_logfiles()
|
|||
if [[ ! -d $SCRIPT_DATA_DIR ]];then
|
||||
mkdir $SCRIPT_DATA_DIR
|
||||
fi
|
||||
if [[ ! -f $LOG_FILE ]];then
|
||||
touch $LOG_FILE
|
||||
else
|
||||
# do the rotation if logfile exists
|
||||
if [[ -f $LOG_FILE ]];then
|
||||
# copy if present second to third
|
||||
if [[ -f $LOG_FILE_1 ]];then
|
||||
mv -f $LOG_FILE_1 $LOG_FILE_2
|
||||
|
@ -801,6 +800,9 @@ create_rotate_logfiles()
|
|||
# then copy initial to second
|
||||
mv -f $LOG_FILE $LOG_FILE_1
|
||||
fi
|
||||
# now create the logfile
|
||||
touch $LOG_FILE
|
||||
# and echo the start data
|
||||
echo "=========================================================" >> $LOG_FILE
|
||||
echo "START $SCRIPT_NAME LOGGING:" >> $LOG_FILE
|
||||
echo "Script started: $( date +%Y-%m-%d-%H:%M:%S )" >> $LOG_FILE
|
||||
|
|
Loading…
Reference in a new issue