added cookie gen

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

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!"