Changes between Version 7 and Version 8 of LogRotate


Ignore:
Timestamp:
Oct 13, 2009, 1:29:58 PM (15 years ago)
Author:
Nicolas
Comment:

use a subshell instead of pushd/popd (I didn't know that much bash when I wrote this script)

Legend:

Unmodified
Added
Removed
Modified
  • LogRotate

    v7 v8  
    2121./bin/stop
    2222pushd ./log_servername
    23 BACKUP_DIR=`date --utc +backup_%Y_%m_%d`
     23BACKUP_DIR=$(date --utc +backup_%Y_%m_%d)
    2424mkdir $BACKUP_DIR
    2525mv *.log *.out $BACKUP_DIR
    26 pushd ..
    27 ./bin/start&
    28 popd
     26( cd .. && ./bin/start& )
    2927tar cjvf $BACKUP_DIR.tar.bz2 $BACKUP_DIR
    3028rm -rf $BACKUP_DIR