{"id":19570419,"url":"https://github.com/natthasath/ispconfig-shell-script","last_synced_at":"2025-10-11T08:40:30.326Z","repository":{"id":165795561,"uuid":"629790581","full_name":"natthasath/ispconfig-shell-script","owner":"natthasath","description":"ISPConfig is a web hosting control panel for Linux servers. A shell script can be used to automate common tasks like creating email accounts and websites, managing FTP users, and configuring SSL certificates.","archived":false,"fork":false,"pushed_at":"2025-07-16T06:36:57.000Z","size":5313,"stargazers_count":4,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-07-17T07:09:27.567Z","etag":null,"topics":["ispconfig","script","shell"],"latest_commit_sha":null,"homepage":"https://git.ispconfig.org/ispconfig/ispconfig-autoinstaller","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/natthasath.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2023-04-19T03:09:57.000Z","updated_at":"2025-07-16T06:37:00.000Z","dependencies_parsed_at":"2024-12-12T08:23:00.493Z","dependency_job_id":"8f4c9ca8-85fd-49a0-8cae-e96b5444ac3a","html_url":"https://github.com/natthasath/ispconfig-shell-script","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/natthasath/ispconfig-shell-script","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/natthasath%2Fispconfig-shell-script","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/natthasath%2Fispconfig-shell-script/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/natthasath%2Fispconfig-shell-script/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/natthasath%2Fispconfig-shell-script/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/natthasath","download_url":"https://codeload.github.com/natthasath/ispconfig-shell-script/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/natthasath%2Fispconfig-shell-script/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":270639326,"owners_count":24620715,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-15T02:00:12.559Z","response_time":110,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ispconfig","script","shell"],"created_at":"2024-11-11T06:14:59.342Z","updated_at":"2025-10-11T08:40:30.301Z","avatar_url":"https://github.com/natthasath.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 🎉 ISPConfig Shell Script\nISPConfig is a web hosting control panel for Linux servers. A shell script can be used to automate common tasks like creating email accounts and websites, managing FTP users, and configuring SSL certificates.\n\n![version](https://img.shields.io/badge/version-1.0-blue)\n![rating](https://img.shields.io/badge/rating-★★★★★-yellow)\n![uptime](https://img.shields.io/badge/uptime-100%25-brightgreen)\n\n### 🐲 Use Apache\n\n```shell\ncurl https://get.ispconfig.org | sh\n```\n\n### 🦄 Use NginX\n\n```shell\ncurl https://get.ispconfig.org | sh -s -- --use-nginx\n```\n\n### 🧩 Check Version\n\n```shell\ngrep 'def.*VERS' /usr/local/ispconfig/server/lib/config.inc.php\n```\n\n### ⌚ Set Timezone\n\n```shell\ntimedatectl\ntimedatectl list-timezones\ntimedatectl set-timezone Asia/Bangkok\n```\n\n### ⌛ Set NTP\n\n```shell\nvi /etc/ntp.conf\n---\nserver time.navy.mi.th iburst\nserver time1.nimt.or.th iburst\nserver clock.nectec.or.th iburst\n```\n\n```shell\nsudo systemctl restart ntp\nsudo systemctl status ntp\nntpq -p\n```\n\n### 🦕 Change Port ISPConfig\n\n- Apache\n\n```shell\nvi /etc/apache2/sites-available/ispconfig.vhost\nsystemctl restart apache2\n```\n\n- Nginx\n\n```shell\nvi /etc/nginx/sites-available/ispconfig.vhost\nsystemctl restart apache2\n```\n\n### 🦚 Change Password Admin ISPConfig\n\n```sql\nuse dbispconfig;\nupdate sys_user set passwort = md5('changeme') where username = 'admin';\nflush privileges;\nquit;\n```\n\n### 🦩 Change Password Root MySQL\n\n```sql\nuse mysql\nalter user 'root'@'localhost' identified by 'changeme';\nflush privileges;\nquit;\n```\n\n### 🐿️ Enable General Log MySQL\n\n```sql\nSHOW VARIABLES LIKE 'datadir';\nSHOW VARIABLES LIKE 'general_log';\nSHOW VARIABLES LIKE 'general_log_file';\nSHOW VARIABLES LIKE 'slow_query_log';\nSHOW VARIABLES LIKE 'log_output'; \nSET GLOBAL general_log = 'ON';\nSET GLOBAL general_log_file = '/var/log/mysql/general.log';\n\n```\n\n### 🐦‍🔥 Config Log Rotation\n\n```shell\nvi /etc/logrotate.d/mysql-general-log\n```\n\n```\n/var/log/mysql/general.log {\n    daily\n    rotate 7\n    compress\n    missingok\n    notifempty\n    create 660 mysql adm\n    postrotate\n        systemctl reload mysql \u003e /dev/null 2\u003e\u00261 || true\n    endscript\n}\n```\n\n```shell\nlogrotate -f /etc/logrotate.d/mysql-general-log\n```\n\n### 🦩 Update Password Root MySQL connect via phpMyAdmin\n\n```shell\nvi /usr/local/ispconfig/server/lib/mysql_clientdb.conf\nsystemctl restart apache2\n```\n\n### 🐙 Change Path phpMyAdmin\n\n```shell\nvi /etc/apache2/conf-enabled/phpmyadmin.conf\n```\n\n```\nAlias /hide /usr/share/phpmyadmin\n```\n\n### 🦠 Change Docker Network Subnet\n\n- Create file\n\n```shell\nvi /etc/docker/daemon.json\n```\n\n- Add configuration\n\n```json\n{\n  \"bip\": \"172.18.0.1/16\"\n}\n```\n\n- Restart Docker\n\n```shell\nsystemctl restart docker\n```\n\n### 🥏 Manual Backup\n\n- Create a backup folder \n\n```shell\nmkdir /home/backup\nchmod 700 /home/backup\ncd /home/backup\n```\n\n- Backup the database\n\n```shell\nmysqldump -u root -p dbispconfig \u003e dbispconfig.sql\n```\n\n- Backup the ISPConfig software\n\n```shell\ntar pcfz ispconfig_software.tar.gz /usr/local/ispconfig\n```\n\n- Backup the configuration files in /etc\n\n```shell\ntar pcfz etc.tar.gz /etc\n```\n\n### 🧁 OS Update\n\n- Enable Maintenance Mode [System -\u003e Main Config -\u003e Misc -\u003e Maintenance Mode]\n- Update Master server first and Slave server\n- Update from Stable only\n\n### 🍧 ISPConfig Update\n\n- ISPConfig Backup: site backup in /usr/local/ispconfig and database backup in /var/backup after run script\n\n```shell\ncd /usr/local/bin/\nispconfig_update.sh\nispconfig_update.sh --force\n```\n\n### 🧦 ISPProtect\n\nISPProtect is a powerful security tool designed to scan and protect web servers against malware and suspicious files. It offers comprehensive monitoring, detection, and removal of threats, ensuring enhanced security for server environments.\n\n```shell\nmkdir -p /usr/local/ispprotect\nchown -R root:root /usr/local/ispprotect\nchmod -R 750 /usr/local/ispprotect\ncd /usr/local/ispprotect\nwget https://www.ispprotect.com/download/ispp_scan.tar.gz\ntar xzf ispp_scan.tar.gz\nrm -f ispp_scan.tar.gz\nln -s /usr/local/ispprotect/ispp_scan /usr/local/bin/ispp_scan\n```\n\n```shell\nispp_scan\n```\n\n### 🪬 WP-CLI\n\n[WP-CLI](https://developer.wordpress.org/cli/commands/) is a command line interface for WordPress. You can update plugins, configure multisite installations, and much more, without using a web browser. Efficient for developers and administrators, it simplifies many WordPress tasks through a simple command-line interface.\n\n```shell\ncurl -O https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar\nphp wp-cli.phar --info\nchmod +x wp-cli.phar\nsudo mv wp-cli.phar /usr/local/bin/wp\n```\n\n- Command Run\n\n```shell\nsudo -u web1 php /usr/local/bin/wp core version\nwp core version --path=/var/www/clients/client1/web1/web\n```\n\n- Sort by priority update\n\n```shell\nsudo -u web1 wp plugin list --path=/var/www/clients/client1/web1/web\nsudo -u web1 wp plugin update --all --path=/var/www/clients/client1/web1/web\nsudo -u web1 wp theme list --path=/var/www/clients/client1/web1/web\nsudo -u web1 wp theme update --all --path=/var/www/clients/client1/web1/web\nsudo -u web1 wp core version --path=/var/www/clients/client1/web1/web\nsudo -u web1 wp core update --path=/var/www/clients/client1/web1/web\n```\n\n- Another Command\n\n```shell\nsudo -u web1 wp user list --path=/var/www/clients/client1/web1/web\nsudo -u web1 wp db check --path=/var/www/clients/client1/web1/web\nsudo -u web1 wp db repair --path=/var/www/clients/client1/web1/web\nsudo -u web1 wp db optimize --path=/var/www/clients/client1/web1/web\nsudo -u web1 wp menu item list main-menu --path=/var/www/clients/client1/web1/web\n```\n\n- Create User\n\n```shell\nsudo -u web1 php /usr/local/bin/wp user create john john@example.com --role=administrator --user_pass=changeme --path=/var/www/clients/client1/web1/web\n```\n\n### 🫂 ZST Compress Command\n\n```shell\nsudo apt install zstd -y\ntar -czvf - input/ | zstd -o output.tar.zst\n```\n\n### ✨ Add PHP Latest Version\n\n```shell\nsudo apt install -y php8.2 php8.2-cli php8.2-fpm php8.2-mysql php8.2-curl php8.2-gd php8.2-intl php8.2-mbstring php8.2-xml php8.2-zip php8.2-soap php8.2-bcmath\nsudo apt install -y php8.3 php8.3-cli php8.3-fpm php8.3-mysql php8.3-curl php8.3-gd php8.3-intl php8.3-mbstring php8.3-xml php8.3-zip php8.3-soap php8.3-bcmath\nsudo apt install -y php8.4 php8.4-cli php8.4-fpm php8.4-mysql php8.4-curl php8.4-gd php8.4-intl php8.4-mbstring php8.4-xml php8.4-zip php8.4-soap php8.4-bcmath\n\nsudo systemctl enable php8.2-fpm\nsudo systemctl start php8.2-fpm\nsudo systemctl status php8.2-fpm\n\nsudo systemctl enable php8.3-fpm\nsudo systemctl start php8.3-fpm\nsudo systemctl status php8.3-fpm\n\nsudo systemctl enable php8.4-fpm\nsudo systemctl start php8.4-fpm\nsudo systemctl status php8.4-fpm\n\nphp8.2 -v\nphp8.3 -v\nphp8.4 -v\n```\n\n### ⌚ Crontab\n\n```shell\n0 5 * * * /root/ispconfig-shell-script/scripts/list-wordpress-backup.sh\n0 6 * * * /root/ispconfig-shell-script/scripts/delete-wordpress-backups.sh\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnatthasath%2Fispconfig-shell-script","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnatthasath%2Fispconfig-shell-script","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnatthasath%2Fispconfig-shell-script/lists"}