initial commit of file from CVS for smeserver-automysqlbackup on Sat Sep 7 20:08:47 AEST 2024
This commit is contained in:
15
root/sbin/e-smith/runmysqlbackup
Normal file
15
root/sbin/e-smith/runmysqlbackup
Normal file
@@ -0,0 +1,15 @@
|
||||
#!/bin/bash
|
||||
|
||||
/usr/local/bin/automysqlbackup $1 $2 >/dev/null
|
||||
|
||||
DB=$(/sbin/e-smith/db configuration getprop automysqlbackup Backupdir)
|
||||
|
||||
if [ -z "$DB" ]; then
|
||||
DB="/root/backup/db";
|
||||
fi
|
||||
|
||||
if [[ "$DB" =~ "^/root/backup" ]] || [[ "$DB" =~ "^/home/e-smith/db/" ]] ; then
|
||||
chown root:root $DB$2 -R
|
||||
find $DB$2 -type f -exec chmod 400 {} \;
|
||||
find $DB$2 -type d -exec chmod 700 {} \;
|
||||
fi
|
Reference in New Issue
Block a user