-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnon-vagrant-extras.sh
executable file
·32 lines (27 loc) · 1.04 KB
/
non-vagrant-extras.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#!/bin/bash
NFS_SERVER='10.0.0.150'
#Enable swap
if [[ -z $(swapon -s | grep -E "^/") ]] ; then
sudo fallocate -l 1G /swapfile
sudo touch /swapfile
sudo chown root:root /swapfile
sudo chmod 600 /swapfile
sudo mkswap /swapfile
echo '/swapfile none swap sw 0 0' | sudo tee -a /etc/fstab
sudo sysctl vm.swappiness=10
echo 'vm.swappiness=10' | sudo tee -a /etc/sysctl.conf
#sudo sysctl vm.vfs_cache_pressure=50
#echo 'vm.vfs_cache_pressure=50' | sudo tee -a /etc/sysctl.conf
sudo swapon /swapfile
fi
#Move config files
sudo cp configs/docker-daemon.json /etc/docker/daemon.json
sudo cp configs/sudoers /etc/sudoers
#sudo cp configs/fstab /etc/fstab
sudo bash -c "echo '10.0.0.150:/volumeUSB1/usbshare/raw-files/fileserver/shares/lab-data /data n fs defaults 0 0' >> /etc/fstab"
#Setup networking with interfaces.d cfg files
sudo cp configs/interfaces /etc/network/interfaces
sudo cp configs/eth0.cfg /etc/network/interfaces.d/eth0.cfg
sudo chown root:root /etc/network/interfaces.d -R
sudo chmod -R 644 /etc/network/interfaces.d/
echo Done