create backup dir when backing up printer.cfg if it doesn't exist yet (#1)

This commit is contained in:
th33xitus
2020-05-25 15:49:42 +02:00
parent 025f016145
commit 993da27665

View File

@@ -480,6 +480,10 @@ backup_msg(){
status_msg "Running $1 backup ..." status_msg "Running $1 backup ..."
} }
backup_cfg(){ backup_cfg(){
if [ ! -d $BACKUP_DIR ]
then
mkdir -p ${HOME}/backup
fi
if [ -f $CFG_FILE ] if [ -f $CFG_FILE ]
then then
get_date get_date