added cookie gen

This commit is contained in:
Sophia Atkinson 2023-02-09 19:11:26 -08:00
parent 0b6915ebd7
commit 6c2140851d
2 changed files with 30 additions and 0 deletions

View File

@ -0,0 +1,27 @@
#!/bin/bash
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
sudo apt-get install bzr git mercurial go- -y
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

View File

@ -41,6 +41,9 @@ sudo tar xzf /usr/share/phpmyadmin/phpMyAdmin-"$PMA_VER"-all-languages.tar.gz -C
sudo mv /usr/share/phpmyadmin/phpMyAdmin-"$PMA_VER"-all-languages/* /usr/share/phpmyadmin
sudo mkdir /usr/share/phpmyadmin/tmp/ && chmod -R 777 /usr/share/phpmyadmin/tmp/
sudo rm -rf /usr/share/phpmyadmin/phpMyAdmin-"$PMA_VER"-all-languages /usr/share/phpmyadmin/phpMyAdmin-"$PMA_VER"-all-languages.tar.gz
## Thanks https://stackoverflow.com/users/3266847/benjamin-w
randomBlowfishSecret=$(openssl rand -base64 22)
sudo sed -e "s|cfg\['blowfish_secret'\] = ''|cfg['blowfish_secret'] = '$randomBlowfishSecret'|" /usr/share/phpmyadmin/config.sample.inc.php > /usr/share/phpmyadmin/config.inc.php
sudo systemctl restart apache2
echo -e "=================================================================="
echo "phpMyAdmin has been updated!"