thelinuxlist/scripts/hockeypuckinstall.sh

42 lines
1.1 KiB
Bash
Raw Normal View History

2023-04-08 14:21:14 -07:00
#!/usr/bin/env bash
2023-08-04 01:30:15 -07:00
trap 'exit 130' INT
2023-02-09 19:11:26 -08:00
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
2023-08-04 01:06:24 -07:00
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
2023-02-09 19:11:26 -08:00
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