This file contains hidden or 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 | |
| declare -a users_to_create | |
| echo "Scanning for users with missing home directories..." | |
| while IFS=: read -r username _ uid gid _ homedir shell; do | |
| # Ignore system users (UID < 1000), but include UID 0 (root) | |
| # Also skip 'nobody' (UID 65534) and users with non-functional home directories | |
| if [[ ("$uid" -ge 1000 || "$uid" -eq 0) && "$homedir" != "/nonexistent" && "$uid" -ne 65534 ]]; then |
This file contains hidden or 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 | |
| IONCUBE_DIR="/usr/local/ioncube" | |
| REFERENCE_FILE="$IONCUBE_DIR/loader-wizard.php" | |
| TMP_DIR="/tmp/ioncube_update" | |
| LATEST_URL="https://downloads.ioncube.com/loader_downloads/ioncube_loaders_lin_x86-64.tar.gz" | |
| echo "Updating ionCube Loaders..." | |
| # Ensure the reference file exists |
This file contains hidden or 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 | |
| set -o errexit | |
| set -o nounset | |
| set -o pipefail | |
| # Configuration | |
| REMOTE_USER="your_user" | |
| REMOTE_HOST="your_remote_host" | |
| REMOTE_DIR="/path/to/remote/destination" |
This file contains hidden or 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 | |
| ############################################################################## | |
| # At the least you will need to set the remote transfer credentials and paths. | |
| # This script will keep 14 days of backups on your destination host. | |
| ############################################################################## | |
| TEMP_DIR="/temp" | |
| TIMESTAMP=$(date +%Y%m%d%H%M%S) | |
| ARCHIVE_NAME="$TEMP_DIR/control-backup_$TIMESTAMP.tar.gz" |
This file contains hidden or 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 | |
| wp language core install en_AU | |
| wp site switch-language en_AU | |
| wp rewrite structure '/%postname%/' | |
| wp option update timezone_string "Australia/Sydney" | |
| wp option set blog_public 0 | |
| wp theme install hello-elementor | |
| wp theme install https://github.com/elementor/hello-theme-child/archive/refs/heads/master.zip --activate | |
| wp plugin install postmark-approved-wordpress-plugin --activate |
This file contains hidden or 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
| SQL=$(mysql -sN -e "SELECT CONCAT('ALTER TABLE \`', table_schema, '\`.\`', table_name, '\` ENGINE=InnoDB;') FROM information_schema.tables WHERE engine='MyISAM' AND table_schema NOT IN ('information_schema', 'mysql', 'performance_schema', 'sys');"); if [ -z "$SQL" ]; then echo "No tables to update."; read -n 1 -s -r -p "Press any key to close..."; echo; else echo -e "\n--- THE FOLLOWING COMMANDS WILL RUN ---\n$SQL\n--- END OF COMMANDS ---"; read -p "Execute these changes? (y/n): " confirm; [[ $confirm == [yY] ]] && echo "$SQL" | mysql && echo "Conversion complete."; fi |
This file contains hidden or 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 | |
| LOG_USER_DIR="/var/www" | |
| LOG_SERVER_DIR="/var/log" | |
| TRUNC_USER_SIZE="+3M" | |
| TRUNC_USER_BYTES=3145728 | |
| TRUNC_SERVER_SIZE="+50M" | |
| TRUNC_SERVER_BYTES=52428800 | |
| JOURNAL_RETENTION_DAYS=10 | |
| POSTFIX_LOG="/var/log/postfix.log" |
This file contains hidden or 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
| location ~ /clients/admin/(client!\.php|client/(.*)|table/(.*)|search!\.php|search/(.*)|apps|billing|setup|user|services|addons|domains|utilitiesemailmarketer!\.php|utilities/(.*)|logs|help!\.php|help/license|modules|image/(recent|upload)|validation_com/(.*))/?(.*)$ { | |
| rewrite ^/(.*)$ /clients/admin/index.php?rp=/admin/$1/$2; | |
| } | |
| location ~ /clients/(images/em|invoice|domain|login|invite|password|account|store|download|knowledgebase|announcements|clientarea/ssl-certificates|user/(verification|accounts|profile|password|security|verify)|cart/(domain/renew)|domain/pricing|cart/order|images/kb)/?(.*)$ { | |
| rewrite ^/(.*)$ /clients/index.php?rp=/$1/$2; | |
| } | |
| location ~ /clients/auth/manage/client/links/?(.*)$ { | |
| rewrite ^/(.*)$ /clients/index.php?rp=/auth/manage/client/links$1; |