Update 'README.md'

This commit is contained in:
Erreur32 2021-02-06 16:05:37 +01:00
parent d353ff6804
commit 53101d47c7
1 changed files with 46 additions and 43 deletions

View File

@ -19,10 +19,11 @@
### #1 Download Archive ### #1 Download Archive
Download last archive https://git.echosystem.fr/Erreur32/DayZ-Stat-Server/archive/0.32.zip - Download lastest archive https://git.echosystem.fr/Erreur32/DayZ-Stat-Server/archive/0.32.zip
# or Use the lastest version with git
git clone https://git.echosystem.fr/Erreur32/DayZ-Stat-Server.git > ## or Use the lastest version with git
> git clone https://git.echosystem.fr/Erreur32/DayZ-Stat-Server.git
@ -44,54 +45,56 @@
- mysql database (to store status server for graph) - mysql database (to store status server for graph)
Create `dayzstat` database first + user privilege. Checkout Schema database in SQL/table.sql Create `dayzstat` database first + user privilege. Checkout Schema database in SQL/table.sql
> -- Adminer 4.7.8 MySQL dump > ### edit config/consql.php
>
> SET NAMES utf8; > -- Adminer 4.7.8 MySQL dump
> SET foreign_key_checks = 0; >
> SET sql_mode = 'NO_AUTO_VALUE_ON_ZERO'; > SET NAMES utf8;
> > SET foreign_key_checks = 0;
> SET NAMES utf8mb4; > SET sql_mode = 'NO_AUTO_VALUE_ON_ZERO';
> >
> CREATE TABLE `StatServer_5` ( > SET NAMES utf8mb4;
> `id` int(11) NOT NULL AUTO_INCREMENT, >
> `date` datetime DEFAULT NULL ON UPDATE current_timestamp(), > CREATE TABLE `StatServer_5` (
> `name` varchar(74) NOT NULL DEFAULT 'Offline', > `id` int(11) NOT NULL AUTO_INCREMENT,
> `players` varchar(32) NOT NULL DEFAULT '0', > `date` datetime DEFAULT NULL ON UPDATE current_timestamp(),
> `maxplayers` varchar(4) DEFAULT NULL, > `name` varchar(74) NOT NULL DEFAULT 'Offline',
> `map` varchar(19) DEFAULT NULL, > `players` varchar(32) NOT NULL DEFAULT '0',
> `game` varchar(4) DEFAULT NULL, > `maxplayers` varchar(4) DEFAULT NULL,
> `version` varchar(15) DEFAULT NULL, > `map` varchar(19) DEFAULT NULL,
> `timeserver` varchar(12) DEFAULT NULL, > `game` varchar(4) DEFAULT NULL,
> `timespeed` varchar(5) DEFAULT NULL, > `version` varchar(15) DEFAULT NULL,
> `timespeedn` varchar(5) DEFAULT NULL, > `timeserver` varchar(12) DEFAULT NULL,
> `mod` varchar(5) DEFAULT NULL, > `timespeed` varchar(5) DEFAULT NULL,
> `battleye` tinytext DEFAULT NULL, > `timespeedn` varchar(5) DEFAULT NULL,
> `hive` varchar(11) DEFAULT NULL, > `mod` varchar(5) DEFAULT NULL,
> `connect` varchar(32) DEFAULT NULL, > `battleye` tinytext DEFAULT NULL,
> `secure` tinytext DEFAULT NULL, > `hive` varchar(11) DEFAULT NULL,
> `ping` varchar(3) DEFAULT '0', > `connect` varchar(32) DEFAULT NULL,
> PRIMARY KEY (`id`), > `secure` tinytext DEFAULT NULL,
> KEY `timeserver` (`timeserver`), > `ping` varchar(3) DEFAULT '0',
> KEY `date` (`date`) > PRIMARY KEY (`id`),
> ) ENGINE=InnoDB DEFAULT CHARSET=utf8; > KEY `timeserver` (`timeserver`),
> > KEY `date` (`date`)
> > ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
> -- 2021-02-05 10:22:08 >
> >
> -- 2021-02-05 10:22:08
>
- **2 Differents way for your crontab** with Shell or php (recommended). - **2 Differents way for your crontab** with Shell or php (recommended).
### #4 Crontab to fill Database. ### #4 Crontab to fill Database.
>#### For Shell (SQL insert + json) >#### For Shell (SQL insert + json)
> */5 * * * * /usr/sbin/sh /pathto/config/statserver_json.sh &>/dev/null > */5 * * * * /usr/sbin/sh /pathto/config/statserver_json.sh &>/dev/null
OR (recommended) OR (recommended)
>#### For php (SQL insert) >#### For php (SQL insert)
> */5 * * * * /usr/local/bin/php -f /yourpath.../config/dayz2json_parser_sql.php &>/dev/null > */5 * * * * /usr/local/bin/php -f /yourpath.../config/dayz2json_parser_sql.php &>/dev/null
> tips change *&>/dev/null* to *2>&1* to know what is going on, maybe spam your mail log. > tips change *&>/dev/null* to *2>&1* to know what is going on, maybe spam your mail log.
Check your time zone here. https://www.php.net/manual/en/timezones.others.php and adapt in dayz2json_parser_sql.php. Check your time zone here. https://www.php.net/manual/en/timezones.others.php and adapt in dayz2json_parser_sql.php.