- 2018-05-24
- http://hdac.moricpool.com
- [email protected]
Payout for pendings / HDAC Nomp Poll Software
- automatic payout from 100 confirm
php-cli, php-redis, mariadb-server, php-mysql
sudo apt install php-cli php-redis mariadb-server php-mysql
- add crontab ( repeat per 1hr )
0 * * * * /[DIR]/payout.php
sudo service mysql start
mysql_secure_installation
mysql
create database pool;
create user userid;
create user 'userid'@'localhost' identified by 'password';
grant all privileges on pool.* to 'userid'@'localhost';
running from bash shell
./payout.php
CREATE TABLE `payout` (
`seq` int(11) NOT NULL,
`block` int(11) NOT NULL,
`address` varchar(35) NOT NULL,
`amount` double NOT NULL,
`txid` varchar(64) NOT NULL,
`timestamp` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
ALTER TABLE `payout`
ADD PRIMARY KEY (`seq`),
ADD KEY `address` (`address`),
ADD KEY `txid` (`txid`),
ADD KEY `timestamp` (`timestamp`),
ADD KEY `block` (`block`);
ALTER TABLE `payout`
MODIFY `seq` int(11) NOT NULL AUTO_INCREMENT;