Advertisement
Guest User

Untitled

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