#!/usr/bin/env bash

## This configuration is suited to local-only dev.

echo "<?php"
echo "/* Servers configuration */"
echo "\$i = 0;"
echo ""
echo "/* Server: localhost [1] */"
echo "\$i++;"
echo "\$cfg['Servers'][\$i]['verbose'] = 'localhost';"
echo "\$cfg['Servers'][\$i]['host'] = '127.0.0.1';"
echo "\$cfg['Servers'][\$i]['port'] = 3307;"
echo "\$cfg['Servers'][\$i]['socket'] = '';"
echo "\$cfg['Servers'][\$i]['auth_type'] = 'config';"
echo "\$cfg['Servers'][\$i]['user'] = 'root';"
echo "\$cfg['Servers'][\$i]['password'] = '';"
echo "\$cfg['Servers'][\$i]['AllowNoPassword'] = true;"
echo "\$cfg['Servers'][\$i]['AllowDeny'] = array("
echo "  'order' => 'explicit',"
echo "  'rules' => ['allow root from localhost'],"
echo ");"
echo ""
echo "/* End of servers configuration */"
echo ""
echo "\$cfg['blowfish_secret'] = '$SITE_TOKEN';"
echo "\$cfg['DefaultLang'] = 'en';"
echo "\$cfg['ServerDefault'] = 1;"
echo "\$cfg['UploadDir'] = '$WEB_ROOT/var/save';"
echo "\$cfg['SaveDir'] = '$WEB_ROOT/var/save';"
echo "\$cfg['TempDir'] = '$WEB_ROOT/var/tmp';"
