initial commit
This commit is contained in:
commit
c3b94b7106
91 changed files with 56958 additions and 0 deletions
15
sync_osss_files
Executable file
15
sync_osss_files
Executable file
|
@ -0,0 +1,15 @@
|
|||
#!/bin/sh
|
||||
if [ ! -f /var/log/rsync.log ]; then
|
||||
sudo touch /var/log/rsync.log
|
||||
sudo chown pi:pi /var/log/rsync.log
|
||||
fi
|
||||
echo "### rsync begin at `date`" >> /var/log/rsync.log
|
||||
if mount -l | grep -q \/smb; then
|
||||
if [ ! -d /smb/`hostname` ]; then
|
||||
mkdir -p /smb/`hostname`
|
||||
fi
|
||||
rsync -avs /var/spool/motion/ /smb/`hostname`/ >> /var/log/rsync.log 2>&1
|
||||
else
|
||||
echo "### error: filesystem is not mounted" >> /var/log/rsync.log
|
||||
fi
|
||||
echo "### rsync end at `date`" >> /var/log/rsync.log
|
Loading…
Add table
Add a link
Reference in a new issue