Advertisement
Guest User

Untitled

a guest
Oct 11th, 2016
98
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.13 KB | None | 0 0
  1. #!/bin/bash
  2.  
  3. set -e
  4. set -v
  5.  
  6. if (! owncloudcmd ) ; then
  7.  
  8. wget http://download.opensuse.org/repositories/isv:ownCloud:desktop/Ubuntu_14.04/Release.key
  9. sudo apt-key add - < Release.key
  10. sudo sh -c "echo 'deb http://download.opensuse.org/repositories/isv:/ownCloud:/desktop/Ubuntu_14.04/ /' > /etc/apt/sources.list.d/owncloud-client.list"
  11. sudo apt-get -y update
  12. sudo apt-get -y -f install owncloud-client
  13.  
  14. mkdir -p ~/bin
  15.  
  16. cat > ~/bin/owncloud_user.conf << HERE
  17. # Please update this file to reflect the correct authentification data
  18. USER=test
  19. PASS=test
  20. SERVER=https://example.org
  21. DIR=~/signage
  22. HERE
  23.  
  24. fi
  25.  
  26. while (! stat ${DIR}/Programm/install.sh) ; do
  27. vi ~/bin/owncloud_user.conf
  28. eval "$(cat ~/bin/owncloud_user.conf)"
  29. mkdir -p ${DIR}
  30. owncloudcmd --silent --user "${USER}" --password "${PASS}" "${DIR}" "${SERVER}"
  31. done
  32.  
  33. cd ${DIR}/Programm
  34. chmod +x install.sh
  35. ./install.sh
  36.  
  37. set +v
  38. echo "***********************************************"
  39. echo "Installation was successful. Please restart the"
  40. echo "machine by typing: sudo telinit 6"
  41. echo "***********************************************"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement