fix config missing key

This commit is contained in:
pvincent
2021-08-30 22:49:34 +04:00
parent ca6aceffbc
commit 98dffaebed
3 changed files with 87 additions and 123 deletions
+9 -14
View File
@@ -28,11 +28,6 @@ curl -L https://deb.nodesource.com/setup_8.x | bash -
apt install -y nodejs=8.17.0-1nodesource1
apt install -y sudo haxe apache2 make git imagemagick gettext libapache2-mod-neko mariadb-server sendemail libio-socket-ssl-perl libnet-ssleay-perl
mysql -u root <<EOF
CREATE DATABASE cagettepei;
GRANT ALL ON cagettepei.* TO 'cagettepei'@'%' IDENTIFIED BY 'cagettepei';
EOF
cd /var/www
git clone https://git.artcode.re/cagetters/cagettepei.git
cd cagettepei
@@ -69,18 +64,18 @@ vim config.xml
```
```
<config
host="<DOMAIN.TLD>"
database="mysql://cagettepei:cagettepei@localhost/cagettepei"
key="<SECRET_PHRASE>"
host = "<DOMAIN.TLD>"
database = "mysql://cagettepei:cagettepei@localhost/cagettepei"
key = "<SECRET_PHRASE>"
default_email = "<EMAIL>"
webmaster_email = "<EMAIL>"
debug="0"
sqllog="0"
maintain="0"
debug = "0"
sqllog = "0"
maintain = "0"
cache="1"
cachetpl="0"
cache = "1"
cachetpl = "0"
/>
```
@@ -91,7 +86,7 @@ go to http://localhost for ERROR + table regeneration, then
```
cd /var/www/cagettepei
SECRET=$(grep key= config.xml | cut -d= -f2 | cut -d'"' -f2)
SECRET=$(grep key config.xml | cut -d= -f2 | cut -d'"' -f2)
echo "insert into User values (1,'fr',MD5('${SECRET}cagettepei'),1,'Administrateur','Cagette Péi', 'admin', null, null, null, null, null, null, null, null, null, now(), now(),6,null, null)" | mysql -h localhost -u cagettepei -pcagettepei cagettepei
```