Changes between Version 7 and Version 8 of LogRotate

Show
Ignore:
Author:
Nicolas (IP: 190.188.180.148)
Timestamp:
10/13/09 13:29:58 (1 month ago)
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 

If this page is incomplete or incorrect, please edit it or add it to the wiki to-do list. To do this, you must be logged in; click Login or Register above.