From 4d20bf697d4fdb15531499833b89e958c5321cac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C6=ACHE=20=D0=AFAW=20=E2=98=A3?= Date: Fri, 3 May 2019 22:44:46 +0200 Subject: [PATCH] Create install --- install | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 install diff --git a/install b/install new file mode 100644 index 0000000..d7f7ee0 --- /dev/null +++ b/install @@ -0,0 +1,38 @@ +#!/bin/bash +case "`grep DISTRIB_CODENAME /etc/*-release | awk -F '=' '{print $2}'`" in + bionic) + if [ "$(whoami)" != "root" ] + then + echo "You should Login as root to use this script!"; + echo "May you already have access for sudo, but this script has no sudo before his commands so please switch"; + echo "sudo -i"; + exit 1 + fi + + if [ -d "/nginx/" ]; then + echo "We've detect a folder '/nginx/' which means" + echo "Maybe you have use this script before!" + echo "You can fix this by executing!" + echo "./clean" + exit 1 + fi + + if [ -d "/etc/nginx" ]; then + echo "We've detect a folder '/etc/nginx' which means" + echo "May you've already installed nginx what's important is that for this installation we need port :80 free" + echo "So please remove nginx or disable it with" + echo "service nginx stop" + echo "systemctl disable nginx" + exit 1 + fi + + if [ -d "/etc/apache2" ]; then + echo "We've detect a folder '/etc/apache2/' which means" + echo "May you've already installed apache2 what's important is that for this installation we need port :80 free" + echo "So please remove apache2 or disable it with" + echo "service apache2 stop" + echo "systemctl disable apache2" + exit 1 + fi + ;; +esac