Browse Source

First commit of Listener setup script

unknown 10 months ago
parent
commit
28c6c622e8
1 changed files with 23 additions and 0 deletions
  1. 23
    0
      ListenerDeploy.sh

+ 23
- 0
ListenerDeploy.sh View File

@@ -0,0 +1,23 @@
1
+#!/bin/bash
2
+
3
+check_privilege() {
4
+    if [[ 'whoami' = 'root' ]];
5
+      then $*
6
+    elif [[ -x /bin/sudo || -x /usr/bin/sudo ]]; then
7
+      echo "sudo $*"
8
+      sudo $*
9
+    else
10
+      echo "Script requires root privilege."
11
+      exit 1
12
+}
13
+
14
+apt-get update
15
+apt-get install apache2 php5.6 php5.6-common php5.6-fpm -y
16
+service apache2 restart
17
+a2enmod rewrite expires headers actions alias
18
+a2enconf php5.6-fpm
19
+echo "Installation finished, now configuring"
20
+sleep 2
21
+read -p "Please enter listener's domain: " domain
22
+
23
+## Add hosts file and wget listner.php from repo