-
Notifications
You must be signed in to change notification settings - Fork 0
/
bootstrap-ubuntu.sh
46 lines (36 loc) · 1.3 KB
/
bootstrap-ubuntu.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
#!/usr/bin/env bash
DISTRO_VER=$(lsb_release -r -s)
echo "DANSTAK Install Script"
echo "Using Distribution Release: $DISTRO_VER"
#########################################
# cleanup platform folder
sudo rm -rf /platform
#########################################
# install base packages
sudo apt install -y git-core
#########################################
# install powershell
# Download the Microsoft repository GPG keys
wget -q https://packages.microsoft.com/config/ubuntu/$DISTRO_VER/packages-microsoft-prod.deb
# Register the Microsoft repository GPG keys
sudo dpkg -i packages-microsoft-prod.deb
# Update the list of products
sudo apt-get update
# Enable the "universe" repositories
sudo add-apt-repository universe
# Install PowerShell
sudo apt-get install -y powershell
rm -rf packages-microsoft-prod.deb
#########################################
# setup base platform folders
sudo mkdir -p /platform
sudo mkdir -p /platform/bin
sudo mkdir -p /platform/sbin
sudo mkdir -p /platform/data
sudo mkdir -p /platform/scripts
sudo git clone https://github.com/djhaanpaa/danstak.git /platform/danstak
sudo setfacl -R -d -m u:dntsadmin:rwx /platform
sudo setfacl -R -m u:dntsadmin:rwx /platform
#########################################
# setup platform bin folder
sudo bash /platform/danstak/platform-bin/update-danstak