initial commit for Unifi 5

This commit is contained in:
Tommi2Day
2016-07-24 19:15:21 +02:00
parent 3f18e78c82
commit 88257b8d83
6 changed files with 200 additions and 0 deletions

15
backup_unifi.sh Normal file
View File

@@ -0,0 +1,15 @@
#!/bin/bash
#mongo logrotate
MONGOPID=$(ps -ef|grep [m]ongod|awk '{print $2}')
if [ -n "$MONGOPID" ]; then
kill -SIGUSR1 $MONGOPID
fi
#backup
cd /usr/lib/unifi1
bash ./unifi.sh stop
sleep 5
tar -czf backups/unifi_data.$(date '+%Y%m%d').tar.gz data >/dev/null
bash ./unifi.sh start