-
Notifications
You must be signed in to change notification settings - Fork 1
/
installer.sh
executable file
·29 lines (29 loc) · 965 Bytes
/
installer.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
#!/bin/bash
INSTALL_PACKAGE="sudo apt-get -y install"
PYTHON_PACKAGE="python3"
if [ -f /usr/bin/pacman ]; then
INSTALL_PACKAGE="sudo pacman -S --noconfirm"
PYTHON_PACKAGE="python"
fi
if [ -f /usr/bin/yum ]; then
INSTALL_PACKAGE="sudo yum -y install"
fi
$INSTALL_PACKAGE telnet
$INSTALL_PACKAGE $PYTHON_PACKAGE
$INSTALL_PACKAGE $PYTHON_PACKAGE-dateutil
$INSTALL_PACKAGE $PYTHON_PACKAGE-paramiko
$INSTALL_PACKAGE $PYTHON_PACKAGE-websocket
$INSTALL_PACKAGE git-core
if [ ! -d /opt/abermush ]; then
sudo useradd -d /opt/abermush/ abermush
sudo git clone https://gitlab.com/bashrc2/AberMUSH /opt/abermush
chown -R abermush:abermush abermush
fi
if [ -d /etc/systemd/system ]; then
sudo cp /opt/abermush/abermush.service /etc/systemd/system/abermush.service
sudo systemctl enable abermush
sudo systemctl restart abermush
fi
if [ ! -f /usr/bin/update-abermush ]; then
sudo cp /opt/abermush/update-abermush /sr/bin/update-abermush
fi