diff --git a/tools/mysql-dump.sh b/tools/mysql-dump.sh index e22e51d..f5929a6 100755 --- a/tools/mysql-dump.sh +++ b/tools/mysql-dump.sh @@ -11,4 +11,8 @@ mariadb-dump --no-data --skip-comments xmr_nodes | \ sed 's/ AUTO_INCREMENT=[0-9]*//g' > \ "./tools/resources/database/structure.sql" +## Dump `tbl_cron` only +# mariadb-dump --no-create-info --skip-comments xmr_nodes tbl_cron > \ +# "./tools/resources/database/tbl_cron.sql" + # vim: set ts=4 sw=4 tw=0 et ft=sh: diff --git a/tools/resources/database/tbl_cron.sql b/tools/resources/database/tbl_cron.sql new file mode 100644 index 0000000..d0c0ba4 --- /dev/null +++ b/tools/resources/database/tbl_cron.sql @@ -0,0 +1,26 @@ + +/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; +/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; +/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; +/*!40101 SET NAMES utf8mb4 */; +/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */; +/*!40103 SET TIME_ZONE='+00:00' */; +/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */; +/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */; +/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */; + +LOCK TABLES `tbl_cron` WRITE; +/*!40000 ALTER TABLE `tbl_cron` DISABLE KEYS */; +INSERT INTO `tbl_cron` VALUES +(1,'Delete old probe logs','delete_old_probe_logs','Delete old probe log from the database',120,0,0,0.007,0,1); +/*!40000 ALTER TABLE `tbl_cron` ENABLE KEYS */; +UNLOCK TABLES; +/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */; + +/*!40101 SET SQL_MODE=@OLD_SQL_MODE */; +/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */; +/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; +/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; +/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; +/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; + diff --git a/tools/resources/init/xmr-nodes-server.service b/tools/resources/init/xmr-nodes-server.service new file mode 100644 index 0000000..ad0518b --- /dev/null +++ b/tools/resources/init/xmr-nodes-server.service @@ -0,0 +1,16 @@ +[Unit] +Description=xmr-node server service +After=network.target mariadb.service + +[Install] +WantedBy=multi-user.target + +[Service] +Type=simple +User=ditatompel +Restart=always +WorkingDirectory=/srv/http/users/ditatompel/vhosts/xmr.ditatompel.com +ExecStart=/srv/http/users/ditatompel/vhosts/xmr.ditatompel.com/bin/xmr-nodes-static-linux-arm64 serve +SyslogIdentifier=xmr-node-server + +# vim: filetype=systemd