This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Threshold for the number of xmlrpc processes indicating an attack | |
THRESHOLD=50 | |
# Path to the custom Nginx configuration include file | |
NGINX_CONF="/etc/nginx/conf.d/custom_code_for_all_domains.conf" | |
# Function to log the change | |
log_change() { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Gunicorn configuration file | |
# https://docs.gunicorn.org/en/stable/configure.html#configuration-file | |
# https://docs.gunicorn.org/en/stable/settings.html | |
import multiprocessing | |
from gunicorn.config import Config | |
import configparser | |
import os |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# https://unix.stackexchange.com/questions/537645/how-to-limit-docker-total-resources | |
# https://www.freedesktop.org/wiki/Software/systemd/ControlGroupInterface/ | |
CPU_PERCENTAGE="90" | |
RAM_PERCENTAGE="90" | |
# Get total RAM in bytes | |
total_ram=$(grep MemTotal /proc/meminfo | awk '{print $2}') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
### | |
# | |
# install and enable fr locale for openpanel | |
# | |
### | |
cd /usr/local/panel && pybabel init -i messages.pot -d translations -l fr | |
wget -O /usr/local/panel/translations/fr/LC_MESSAGES/messages.po https://raw.githubusercontent.com/stefanpejcic/openpanel-translations/main/fr-fr/messages.pot |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Check if Docker is running | |
if ! docker info &>/dev/null; then | |
echo "Docker is not running. Please start Docker and try again." | |
exit 1 | |
fi | |
# Check if the Docker container exists | |
if docker ps -a --format '{{.Names}}' | grep -q "openpanel_mysql"; then |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- phpMyAdmin SQL Dump | |
-- version 5.2.1 | |
-- https://www.phpmyadmin.net/ | |
-- | |
-- Host: localhost | |
-- Generation Time: Sep 21, 2023 at 02:09 PM | |
-- Server version: 8.0.34-0ubuntu0.20.04.1 | |
-- PHP Version: 7.4.3-4ubuntu2.19 | |
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
docker login --username=openpanel | |
# NGINX | |
# | |
# https://hub.docker.com/r/openpanel/nginx/tags | |
# | |
cd /usr/local/panel/DOCKER/nginx/ | |
docker build -t openpanel/nginx:VERZIJAAAA . | |
docker tag openpanel/nginx:VERZIJAAAA openpanel/nginx:latest |
We can make this file beautiful and searchable if this error is corrected: No tabs found in this TSV file in line 0.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
TsvHttpData-1.0 | |
https://get.openpanel.co/downloads/0.1.6/openpanel/38/compressed.tar.gz | |
https://get.openpanel.co/downloads/0.1.6/openpanel/39/compressed.tar.gz | |
https://get.openpanel.co/downloads/0.1.6/openpanel/310/compressed.tar.gz | |
https://get.openpanel.co/downloads/0.1.6/openpanel/311/compressed.tar.gz | |
https://get.openpanel.co/downloads/0.1.6/openadmin/38/compressed.tar.gz | |
https://get.openpanel.co/downloads/0.1.6/openadmin/39/compressed.tar.gz | |
https://get.openpanel.co/downloads/0.1.6/openadmin/310/compressed.tar.gz | |
https://get.openpanel.co/downloads/0.1.6/openadmin/311/compressed.tar.gz |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
databases=`mysql -e "SHOW DATABASES;" | tr -d "| " | grep -v Database` | |
for db in $databases; do | |
if [[ "$db" != "information_schema" ]] && [[ "$db" != "performance_schema" ]] && [[ "$db" != "mysql" ]] && [[ "$db" != _* ]] ; then | |
echo "Exporting database: $db" | |
mysqldump --databases $db > `date +%Y%m%d`.$db.sql | |
fi | |
done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: '3.8' | |
services: | |
db: | |
image: mysql:latest | |
volumes: | |
- db_data:/var/lib/mysql | |
restart: always | |
environment: | |
MYSQL_ROOT_PASSWORD: your_mysql_root_password |
NewerOlder