Skip to content

Commit

Permalink
daily
Browse files Browse the repository at this point in the history
  • Loading branch information
szepeviktor committed Jul 20, 2024
1 parent 491fc8c commit d469147
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 5 deletions.
7 changes: 3 additions & 4 deletions backup/system-backup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
#
# Backup a server with S3QL.
#
# VERSION :3.0.4
# VERSION :3.0.5
# DATE :2021-05-31
# AUTHOR :Viktor Szépe <viktor@szepe.net>
# URL :https://github.com/szepeviktor/debian-server-tools
Expand Down Expand Up @@ -125,8 +125,7 @@ Backup_system_dbs() # Error 4x
mysqldump --skip-lock-tables mysql >"${TARGET}/db-system/mysql-mysql.sql" \
|| Error 41 "MySQL system databases backup failed"
# https://dev.mysql.com/doc/refman/5.7/en/performance-schema-variable-table-migration.html
if [ "$(echo 'SELECT VERSION() LIKE "%MariaDB%";' | mysql -N)" == 1 ] \
|| dpkg --compare-versions "$(echo 'SELECT @@GLOBAL.innodb_version;' | mysql -N)" lt 5.7.6; then
if mysqlshow information_schema | grep -q -F -x 'Database: information_schema'; then
mysqldump --skip-lock-tables information_schema >"${TARGET}/db-system/mysql-information_schema.sql" \
|| Error 42 "MySQL system databases backup failed"
fi
Expand Down Expand Up @@ -163,7 +162,7 @@ Check_db_schemas() # Error 5x
# Triggers included by default / --skip-triggers
# Event Scheduler --events / excluded by default
mysqldump --skip-comments --no-data --routines --triggers --events "$DB" \
| sed -e '1 s#^/\*!999999\\- enable the sandbox mode \*/##' \
| sed -e '1,2{/^\/\*!999999\\- enable the sandbox mode \*\//d;/^$/d}' \
| sed -e 's/ AUTO_INCREMENT=[0-9]\+\b//' \
>"$TEMP_SCHEMA" || Error 51 "Schema dump failure"

Expand Down
2 changes: 1 addition & 1 deletion debian-setup/packages/iptables
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ set -e -x
# http://inai.de/documents/Perfect_Ruleset.pdf
# Enable loopback traffic
Ip46tables -A INPUT -i lo -j ACCEPT
# Enable statefull rules
# Enable stateful rules
Ip46tables -A INPUT -m conntrack --ctstate RELATED,ESTABLISHED -j ACCEPT
# Drop invalid state packets
Ip46tables -A INPUT -m conntrack --ctstate INVALID -j DROP
Expand Down
2 changes: 2 additions & 0 deletions security/myattackers-ipsets/ipset/nobis.ipset
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ add nobis 173.234.144.0/21
# AS396190 - LEASEWEB-USA-SEA-10
add nobis 23.19.248.0/22
#add nobis 23.106.192.0/19
add nobis 23.106.192.0/24
add nobis 23.106.193.0/24
#add nobis 23.108.128.0/19
add nobis 23.108.224.0/19

Expand Down
24 changes: 24 additions & 0 deletions webserver/wp-install/wp-cli-run-frontend.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<?php

/**
* Run WordPress front-end with WP-CLI.
*
* wp --url="https://example.com/" eval-file wp-cli-run-frontend.php
*/

WP_CLI::get_runner()->load_wordpress();

// EDIT Optionally add your code here
add_filter(
'woocommerce_admin_features',
static function ($features) {
var_dump($features);
return $features;
},
0,
1
);

wp();
define('WP_USE_THEMES', true);
require_once ABSPATH . WPINC . '/template-loader.php';

0 comments on commit d469147

Please sign in to comment.