Skip to content

Instantly share code, notes, and snippets.

@AtsushiSuzuki
Last active September 28, 2016 13:22
Show Gist options
  • Save AtsushiSuzuki/fb2a754db7c5271a24c3c320de42fb4b to your computer and use it in GitHub Desktop.
Save AtsushiSuzuki/fb2a754db7c5271a24c3c320de42fb4b to your computer and use it in GitHub Desktop.
delayded windows file sharing server
Vagrant.configure("2") do |config|
config.vm.box = "ubuntu/trusty64"
config.vm.network "private_network", type: "dhcp"
config.vm.provision "shell", inline: <<-SCRIPT
apt-get update
apt-get upgrade -y
apt-get install -y samba
cat <<-EOS >> /etc/samba/smb.conf
[Shared]
path = /vagrant
read only = no
guest ok = yes
EOS
service samba restart
tc qdisc add dev eth1 root netem delay 500ms
sed -i -e "\\$i \\tc qdisc add dev eth1 root netem delay 500ms\\n" /etc/rc.local
SCRIPT
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment