Advertisement
Guest User

shell.sh

a guest
Sep 17th, 2017
100
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.71 KB | None | 0 0
  1. #!/bin/sh
  2. # update & upgrade #
  3. sudo apt-get update
  4. sudo apt-get upgrade
  5. # add custom sources and PPA's #
  6. sudo sh -c "echo '## PPA ###' >> /etc/apt/sources.list"
  7. # ubuntuzilla
  8. sudo apt-key adv --recv-keys --keyserver keyserver.ubuntu.com C1289A29
  9. sudo sh -c "echo 'deb http://downloads.sourceforge.net/project/ubuntuzilla/mozilla/apt all main #Ubuntuzilla' >>/etc/apt/sources.list"
  10. # vlc
  11. sudo add-apt-repository ppa:c-korn/vlc
  12. # getdeb
  13. wget -q -O- http://archive.getdeb.net/getdeb-archive.key | sudo apt-key add -
  14. sudo sh -c "echo 'deb http://archive.getdeb.net/ubuntu karmic-getdeb apps #getdeb' >> /etc/apt/sources.list"
  15. # medibuntu
  16. echo deb http://packages.medibuntu.org/ karmic free non-free | sudo tee -a /etc/apt/sources.list
  17. wget -q http://packages.medibuntu.org/medibuntu-key.gpg -O- | sudo apt-key add -
  18. # update & upgrade #
  19. sudo apt-get update
  20. sudo apt-get upgrade
  21. # REMOVE some unneeded apps #
  22. sudo apt-get remove gnome-games gnome-games-common empathy
  23. # INSTALL new apps #
  24. sudo apt-get install smbfs nautilus-open-terminal vim mc openvpn geany smplayer minitube firefox-mozilla-build thunderbird-mozilla-build ubuntu-restricted-extras
  25. # INSTALL deb files from directory #
  26. sudo dpkg -i /home/yourname/directory/with/deb/files/*.deb
  27. # make some directories needed by fstab #
  28. sudo mkdir /media/remotemachine
  29. sudo mkdir /media/ntfs
  30. # create samba credential files #
  31. sudo touch /etc/samba/cred
  32. sudo sh -c "echo 'username=yourusername' >> /etc/samba/cred"
  33. sudo sh -c "echo 'password=yourpassword' >> /etc/samba/cred"
  34. sudo chmod 0600 /etc/samba/cred
  35. # add new hosts #
  36. sudo sh -c "echo '192.168.0.105 remotemachinename' >> /etc/hosts"
  37. # add drives to fstab #
  38. sudo sh -c "echo 'UUID=791957C576AE1E67 /media/ntfs ntfs umask=000,utf8 0 0' >> /etc/fstab"
  39. sudo sh -c "echo '//remoteIP/remote-dir /media/remotemachine cifs credentials=/etc/samba/cred,noperm,uid=1000,gid=1000 0 0' >> /etc/fstab"
  40. # fixing umountcifs problem in Ubuntu on restart and shutdown #
  41. sudo cp /home/yourusername/path/to/the/script/umountcifs /etc/init.d/
  42. sudo update-rc.d umountcifs stop 02 0 6
  43. sudo ln -s /etc/init.d/umountcifs /etc/rc0.d/K01umountcifs
  44. sudo ln -s /etc/init.d/umountcifs /etc/rc6.d/K01umountcifs
  45. # copy OpenVPN certificates to /etc/openvpn #
  46. sudo cp /home/yourusername/.install/vpn/* /etc/openvpn
  47. sudo /etc/init.d/openvpn restart
  48. # time needed to connect to the VPN server (30s with reserve) and mounting drives #
  49. sleep 30 && sudo mount -a
  50. # turn off pc speaker beeping #
  51. echo "blacklist pcspkr" | sudo tee -a /etc/modprobe.d/blacklist
  52. # turn off welcome sound #
  53. sudo -u gdm gconftool-2 --set /desktop/gnome/sound/event_sounds --type bool false
  54. # enabling cpufreq-applet CPU frequency scaling #
  55. sudo chmod u+s /usr/bin/cpufreq-selector
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement