/[svn]/linux scripts/hlds_backup.sh
ViewVC logotype

Diff of /linux scripts/hlds_backup.sh

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 9 by cstrike, Thu Sep 11 22:23:56 2008 UTC revision 58 by cstrike, Wed Feb 20 22:06:48 2013 UTC
# Line 46  Line 46 
46  MYSQL_DB=wc3ft;  MYSQL_DB=wc3ft;
47  ##### Don't change anything below here #####  ##### Don't change anything below here #####
48    
49  EVENODD=$[ `date +%j` % 2 ];  # Without the "-" in "+%-j", date zero pads the number and bash treats it as octal.
50    EVENODD=$[ `date +%-j` % 2 ];
51    
52  # Remove files in directory we are about to use, or create it.  # Remove files in directory we are about to use, or create it.
53  if [ -d /$BACKUP_PATH/$EVENODD/ ]; then  if [ -d /$BACKUP_PATH/$EVENODD/ ]; then
54          rm -rf $BACKUP_PATH/$EVENODD/*          rm -rf $BACKUP_PATH/$EVENODD/*
55  else  else
56          mkdir $BACKUP_PATH/$EVENODD          mkdir $BACKUP_PATH/$EVENODD || { echo 'hlds_backup failed to create backup directory!' >&2; exit 1; }
         # TODO: If this fails, exit script..  
57  fi  fi
58    
59  /etc/init.d/hlds stop  /etc/init.d/hlds stop

Legend:
Removed from v.9  
changed lines
  Added in v.58

Contact webmaster
ViewVC Help
Powered by ViewVC RSS 2.0 feed