forked from Sophia/thelinuxlist
42 lines
1.1 KiB
Bash
42 lines
1.1 KiB
Bash
#!/usr/bin/env bash
|
|
trap 'exit 130' INT
|
|
while true
|
|
do
|
|
read -r -p "Would you like to install Hockeypuck? [Y/n] " input
|
|
|
|
case $input in
|
|
[yY][eE][sS]|[yY])
|
|
break
|
|
;;
|
|
[nN][oO]|[nN])
|
|
break
|
|
;;
|
|
*)
|
|
echo "That wasn't an option..."
|
|
;;
|
|
esac
|
|
done
|
|
if [ ! -x /usr/bin/curl ] ; then
|
|
CURL_NOT_EXIST=1
|
|
apt install -y curl
|
|
else
|
|
CURL_NOT_EXIST=0
|
|
fi
|
|
sudo apt-get install bzr git mercurial -y
|
|
# Check if curl is installed
|
|
if [ ! -x /usr/bin/curl ] ; then
|
|
CURL_NOT_EXIST=1
|
|
apt install -y curl
|
|
else
|
|
CURL_NOT_EXIST=0
|
|
fi
|
|
apt remove golang -y
|
|
wget -O goinstall.sh https://sop.wtf/sh/u/goinstall && bash goinstall.sh
|
|
git clone https://github.com/hockeypuck/packaging /var/lib/hockeypuck
|
|
cd packaging
|
|
./prepare.bash
|
|
export GOPATH=$(pwd)
|
|
go install github.com/hockeypuck/server/cmd/hockeypuck
|
|
go install github.com/hockeypuck/server/cmd/hockeypuck-load
|
|
go install github.com/hockeypuck/server/cmd/hockeypuck-pbuild
|
|
bash /var/lib/hockeypuck -config /var/lib/hockeypuck/hockeypuck.conf |