Merge remote-tracking branch 'refs/remotes/origin/master'
[weathermon.git] / bin / weather-backup
index fd219f7f5dea94cb8d98e7bea19117e797368f21..7f8009b630ffc7348117301ad04a986d1547b7c0 100755 (executable)
@@ -6,10 +6,10 @@ LOGDB=`uci get weathermon.process.logdb`
 
 if [ ! -z "$BACKLOGDB" ]; then
        BACKLOG_BASE=$(basename "$BACKLOGDB")
 
 if [ ! -z "$BACKLOGDB" ]; then
        BACKLOG_BASE=$(basename "$BACKLOGDB")
-       sqlite3 "$BACKLOGDB" ".backup $BACKUP_DIR/$BACKLOG_BASE" 
+       sqlite3 -readonly "$BACKLOGDB" ".backup $BACKUP_DIR/$BACKLOG_BASE" 
 fi
 
 if [ ! -z "$LOGDB" ]; then
        LOG_BASE=$(basename "$LOGDB")
 fi
 
 if [ ! -z "$LOGDB" ]; then
        LOG_BASE=$(basename "$LOGDB")
-       sqlite3 "$LOGDB" ".backup $BACKUP_DIR/$LOG_BASE" 
+       sqlite3 -readonly "$LOGDB" ".backup $BACKUP_DIR/$LOG_BASE" 
 fi
 fi