-
Notifications
You must be signed in to change notification settings - Fork 150
/
alpine-install.sh
executable file
·44 lines (35 loc) · 1.15 KB
/
alpine-install.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
#!/bin/sh
echo "Bot Tok Alpine Install"
echo "Install BotTok Dependenties:"
# install OpenSSH
apk add openssh
# Set Alpine v3.17 repositories
echo http://nl.alpinelinux.org/alpine/v3.17/community > /etc/apk/repositories
echo http://nl.alpinelinux.org/alpine/v3.17/main >> /etc/apk/repositories
apk update
# Install packages
programs="nmap chromium nodejs yarn git openssh"
for program in $programs; do
if ! command -v $program >/dev/null 2>&1; then
echo "Installing $program..."
apk add -q --no-cache $program
else
echo "$program already installed."
$program --version
fi
done
echo "Add your SSH Public Key to your GitHub account"
ssh-keygen -t rsa -N "" -f ~/.ssh/id_rsa
cat ~/.ssh/id_rsa.pub
echo "Copy its content and paste it into your GitHub account in:"
echo "https://github.com/settings/ssh/new"
echo "Once this is done press enter to continue"
read
echo "Installing BotTok..."
git clone [email protected]:jfadev/bottok.git
cd bottok
export PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=true
export PUPPETEER_EXECUTABLE_PATH=/usr/bin/chromium-browser
yarn install --network-timeout 6000000
echo "Starting BotTok..."
node bottok.js