Advertisement
Guest User

Untitled

a guest
Oct 11th, 2016
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.23 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. while (! stat ${DIR}/Programm/install.sh) ; do
  30. vi "${CONF}"
  31. eval "$(cat ${CONF})"
  32. mkdir -p ${DIR}
  33. owncloudcmd --silent --user "${USER}" --password "${PASS}" "${DIR}" "${SERVER}"
  34. done
  35.  
  36. cd ${DIR}/Programm
  37. chmod +x install.sh
  38. ./install.sh
  39.  
  40. set +v
  41. echo "***********************************************"
  42. echo "Installation was successful. Please restart the"
  43. echo "machine by typing: sudo telinit 6"
  44. echo "***********************************************"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement