2015-06-12 11:42:25 +03:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
|
|
# Run this after every fresh Linux install in MIT
|
|
|
|
|
|
|
|
|
|
# Check for root privileges
|
|
|
|
|
if [ $EUID -ne 0 ]; then
|
|
|
|
|
echo "This script need root privileges. Please start it with sudo $(basename $0) or get a root shell with sudo -s"
|
|
|
|
|
exit 1
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
if [ "$1" = "reset" ]; then
|
|
|
|
|
echo "Configuring apt to NOT use local apt-cacher-ng proxy"
|
|
|
|
|
mv /etc/apt/apt.conf.d/01proxy /etc/apt/apt.conf.d/01proxy.bak
|
|
|
|
|
exit 0
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
|
2015-06-24 12:45:09 +03:00
|
|
|
# Disable timeout in grub (only in Dual boot)
|
|
|
|
|
#echo "Update GRUB timeout to unlimited"
|
|
|
|
|
#cp /etc/default/grub /etc/default/grub.bak
|
|
|
|
|
#sed "s|^GRUB_TIMEOUT=.*$|GRUB_TIMEOUT=-1|" /etc/default/grub > grub.tmp ; mv grub.tmp /etc/default/grub
|
|
|
|
|
#update-grub
|
2015-06-12 11:42:25 +03:00
|
|
|
|
|
|
|
|
|
|
|
|
|
# Set apt-cacher-ng proxy
|
|
|
|
|
echo "Configuring apt to use local apt-cacher-ng proxy"
|
2015-07-24 14:23:16 +03:00
|
|
|
echo 'Acquire::http { Proxy "http://192.168.10.10:3142"; };
|
2015-06-12 11:42:25 +03:00
|
|
|
Acquire::https { Proxy "https://"; };' > "/etc/apt/apt.conf.d/01proxy"
|
|
|
|
|
|
|
|
|
|
killall apt-get
|
|
|
|
|
# apt-get update "offline"
|
|
|
|
|
#mv /var/lib/apt/lists /var/lib/apt/lists.old
|
|
|
|
|
#mv lists /var/lib/apt/
|
|
|
|
|
apt-get update
|
|
|
|
|
|
2015-06-24 12:45:09 +03:00
|
|
|
# Default software
|
|
|
|
|
echo "Installing default software"
|
|
|
|
|
apt-get -y install synaptic filezilla
|
|
|
|
|
|
2015-06-12 11:42:25 +03:00
|
|
|
|
|
|
|
|
# Reset GUI settings on every login (XFCE)
|
|
|
|
|
USER=$(grep ":1000:" /etc/passwd | awk -F: '{ print $1 }')
|
|
|
|
|
sed -i "/^exit 0/irm -rf \/home\/$USER\/.config\/xfce4\/xfconf\/xfce-perchannel-xml\/*" /etc/rc.local
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# Final instructions
|
|
|
|
|
echo
|
|
|
|
|
echo "Please disable automatic update checks in: Menu > Preferences > Software & Updates > Updates > Automatically check for updates"
|