-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathowncloudsync
48 lines (44 loc) · 1.23 KB
/
owncloudsync
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
#!/bin/bash
################### INSTALLATION
# mkdir -p ~/dev/owncloud
# cd ~/dev/owncloud
# wget http://download.owncloud.com/desktop/stable/owncloudclient-1.8.4.tar.xz
# tar -xvJf owncloudclient-1.8.4.tar.xz
# wget http://ndevilla.free.fr/iniparser/iniparser-3.1.tar.gz
# sudo apt-get install libsqlite3-dev libneon27-dev libqt4-dev libqtkeychain0 qtkeychain-dev libqt4-sql-sqlite cmake
#
## compilieren ownCloud client - takes some time
#
# mkdir client-build
# cd client-build
# cmake -DCMAKE_BUILD_TYPE="Release" ../owncloudclient-1.8.4
# make
# sudo make install
# sudo ldconfig
#
## enter credentials
#
# vi or nano ~/.netrc
#
#
# machine mein.server.de
# login benutzername
# password passwort
#
#
# chmod 0600 ~/.netrc
#
# Example usage:
#
# owncloudcmd --non-interactive -n /var/daten/owncloud/ https://mein.server.de/remote.php/webdav/
#
#
# In order to do this every minute, you could make this entry to your crontab
# * * * * * pi /home/pi/owncloudsync.sh > /dev/null 2>&1
OC=$(ps ax | grep [o]wncloudcmd)
if [ "$OC" != "" ]; then
exit 1
else
nice -n 19 /usr/local/bin/owncloudcmd --non-interactive -n /home/pi/musik/ http://someOwncloudServer.de/remote.php/webdav/
exit 0
fi