From 65c8377d1716346a04e99e679f34bbb0d4f8bb0e Mon Sep 17 00:00:00 2001 From: Markus Krogh Date: Wed, 6 Jun 2018 13:44:10 +0200 Subject: Adding Ubuntu + cosmos checks, move ldap-utils install --- install.sh | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'install.sh') diff --git a/install.sh b/install.sh index aedc817..bda419b 100755 --- a/install.sh +++ b/install.sh @@ -5,6 +5,22 @@ SSH_KEYS_PATH=/usr/local/bin/ssh-keys.sh SSH_URL="https://code.nordu.net/?p=cf-replace.git;a=blob_plain;f=ssh-keys.sh;hb=HEAD" CROND_URL="https://code.nordu.net/?p=cf-replace.git;a=blob_plain;f=cf-replace;hb=HEAD" +if ! grep -q -i ubuntu /etc/lsb-release; then + echo "Not installing, this is not an Ubuntu machine" + exit 1 +fi +if [ -d /var/cache/cosmos/ ]; then + echo "Not installing, machine is running cosmos" + exit 1 +fi + +if ! which ldapsearch >> /dev/null; then + if ! apt-get install -y -qq ldap-utils >> /dev/null; then + echo "Failed to install ldap-utils" + exit 1 + fi +fi + if ! curl -s --show-error "$SSH_URL" > "$SSH_KEYS_PATH"; then echo "Failed to get ssh-keys.sh file" exit 1 -- cgit v1.1