mirror of
https://github.com/tommytran732/Pterodactyl-Script
synced 2024-11-22 10:31:34 -05:00
Update install.sh
This commit is contained in:
parent
cbd972b309
commit
0bc617d5bb
38
install.sh
38
install.sh
@ -729,7 +729,8 @@ install_phpmyadmin(){
|
||||
cd /var/www/pterodactyl/public/phpmyadmin || exit
|
||||
SERVER_IP=$(dig +short myip.opendns.com @resolver1.opendns.com -4)
|
||||
BOWFISH=`cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 34 | head -n 1`
|
||||
bash -c 'cat > /var/www/pterodactyl/public/phpMyAdmin/config.inc.php' <<EOF
|
||||
if [ "$lsb_dist" = "fedora" ] || [ "$lsb_dist" = "centos" ] || [ "$lsb_dist" = "rhel" ] || [ "$lsb_dist" = "rocky" ] || [ "$lsb_dist" = "almalinux" ]; then
|
||||
bash -c 'cat > /etc/phpMyAdmin/config.inc.php' <<EOF
|
||||
<?php
|
||||
/* Servers configuration */
|
||||
\$i = 0;
|
||||
@ -746,19 +747,38 @@ install_phpmyadmin(){
|
||||
\$cfg['blowfish_secret'] = '${BOWFISH}';
|
||||
\$cfg['DefaultLang'] = 'en';
|
||||
\$cfg['ServerDefault'] = 1;
|
||||
\$cfg['UploadDir'] = '';
|
||||
\$cfg['SaveDir'] = '';
|
||||
\$cfg['UploadDir'] = '/var/lib/phpMyAdmin/upload';
|
||||
\$cfg['SaveDir'] = '/var/lib/phpMyAdmin/save';
|
||||
\$cfg['CaptchaLoginPublicKey'] = '6LcJcjwUAAAAAO_Xqjrtj9wWufUpYRnK6BW8lnfn';
|
||||
\$cfg['CaptchaLoginPrivateKey'] = '6LcJcjwUAAAAALOcDJqAEYKTDhwELCkzUkNDQ0J5'
|
||||
?>
|
||||
EOF
|
||||
output "Installation completed."
|
||||
chown -R nginx:nginx /var/www/pterodactyl
|
||||
if [ "$lsb_dist" = "ubuntu" ] || [ "$lsb_dist" = "debian" ]; then
|
||||
chown -R www-data:www-data * /var/www/pterodactyl
|
||||
elif [ "$lsb_dist" = "fedora" ] || [ "$lsb_dist" = "centos" ] || [ "$lsb_dist" = "rhel" ] || [ "$lsb_dist" = "rocky" ] || [ "$lsb_dist" = "almalinux" ]; then
|
||||
chown -R nginx:nginx * /var/www/pterodactyl
|
||||
semanage fcontext -a -t httpd_sys_rw_content_t "/var/www/pterodactyl/storage(/.*)?"
|
||||
restorecon -R /var/www/pterodactyl
|
||||
bash -c 'cat > /etc/phpmyadmin/config.inc.php' <<EOF
|
||||
<?php
|
||||
/* Servers configuration */
|
||||
\$i = 0;
|
||||
/* Server: MariaDB [1] */
|
||||
\$i++;
|
||||
\$cfg['Servers'][\$i]['verbose'] = 'MariaDB';
|
||||
\$cfg['Servers'][\$i]['host'] = '${SERVER_IP}';
|
||||
\$cfg['Servers'][\$i]['port'] = '';
|
||||
\$cfg['Servers'][\$i]['socket'] = '';
|
||||
\$cfg['Servers'][\$i]['auth_type'] = 'cookie';
|
||||
\$cfg['Servers'][\$i]['user'] = 'root';
|
||||
\$cfg['Servers'][\$i]['password'] = '';
|
||||
/* End of servers configuration */
|
||||
\$cfg['blowfish_secret'] = '${BOWFISH}';
|
||||
\$cfg['DefaultLang'] = 'en';
|
||||
\$cfg['ServerDefault'] = 1;
|
||||
\$cfg['UploadDir'] = '/var/lib/phpmyadmin/upload';
|
||||
\$cfg['SaveDir'] = '/var/lib/phpmyadmin/save';
|
||||
\$cfg['CaptchaLoginPublicKey'] = '6LcJcjwUAAAAAO_Xqjrtj9wWufUpYRnK6BW8lnfn';
|
||||
\$cfg['CaptchaLoginPrivateKey'] = '6LcJcjwUAAAAALOcDJqAEYKTDhwELCkzUkNDQ0J5'
|
||||
?>
|
||||
EOF
|
||||
chown -R www-data:www-data /var/www/pterodactyl
|
||||
fi
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user