Minor additions

master
Meliurwen 4 years ago
parent 5a6c8229c6
commit ffec21b216
Signed by: meliurwen
GPG Key ID: 818A8B35E9F1CE10
  1. 1
      README.md
  2. 15
      custom/add_to_docker_group.sh
  3. 1
      custom/main.sh

@ -60,6 +60,7 @@ ssh virtualuser@ipAddress -o "StrictHostKeyChecking=no" -o "UserKnownHostsFile=/
```
And then launch this to install Rancher:
```sh
docker run -d --restart=unless-stopped -p 80:80 -p 443:443 --privileged rancher/rancher
```

@ -0,0 +1,15 @@
#!/bin/sh
if [ "$(id -u)" -ne 0 ]; then
echo "This script should be run as root. Aborting..." > /dev/stderr
exit 1
fi
echo "Adding user to the docker group..."
# This if statement evaulates if the script is launched using sudo AND not
# a `sudo su` logged user
if [ -n "$SUDO_USER" ] && [ "$SUDO_COMMAND" != "/usr/bin/su" ]; then
usermod -aG docker "$SUDO_USER"
else
usermod -aG docker "$(id -un)"
fi

@ -12,6 +12,7 @@ eval "${SCRIPTPATH}/install_docker.sh"
eval "${SCRIPTPATH}/install_docker-compose.sh"
eval "${SCRIPTPATH}/disable_swap.sh"
eval "${SCRIPTPATH}/generate_ssh_cluster.sh"
eval "${SCRIPTPATH}/add_to_docker_group.sh"
#eval "${SCRIPTPATH}/install_kubectl.sh"
#eval "${SCRIPTPATH}/install_rke.sh"

Loading…
Cancel
Save