github.com/niedbalski/juju@v0.0.0-20190215020005-8ff100488e47/snap/hooks/configure (about) 1 #!/bin/bash 2 3 # Make sure we have lxd installed to use 4 if [ "$(which lxd)" = "" ]; then 5 snap install lxd || true 6 fi 7 8 # copy bash completions to host system 9 cp -a $SNAP/bash_completions/* /usr/share/bash-completion/completions/. || true 10 11 # setup sysctl defaults for lxd 12 mkdir -p /usr/lib/sysctl.d 13 cat <<EOF>/usr/lib/sysctl.d/juju-2.conf 14 fs.inotify.max_user_watches = 524288 15 fs.inotify.max_user_instances = 256 16 EOF 17 18 sysctl -p /usr/lib/sysctl.d/juju-2.conf