Posts

Showing posts with the label bash

ISPConfig CLI Tools

During a recent migration project, I ran into a limitation of ISPConfig automation. While this web hosting management platform provides an API, working with SOAP is notoriously uncomfortable and clunky. I've faced this problem before—for example, check out my very old post about mass email user creation. This time, I needed to create websites, databases, and database users while migrating hundreds of sites from DirectAdmin (you can read about that massive migration here ). Writing custom PHP scripts for every individual task would have been slow and messy, so I decided to build a proper tool instead. The ISPConfig CLI Tools provide a more comfortable and modern way to automate ISPConfig operations directly from the terminal. The project is still a work in progress, but it already covers the most essential operations. Implemented Functions The CLI toolkit currently covers the following ISPConfig operations, returning clean JSON for easy piping: System & API: ...

How to Backup DocuSign Documents via SFTP Using Mirror

One company uses DocuSign and stores a large number of documents there. At some point a requirement appeared to periodically download and backup all files.

PowerDNS Master-Slave Deployment Using Docker

One of my latest projects was a fully dockerized name server infrastructure based on PowerDNS: one master and two slaves — one in the same subnet and the second running in a cloud on a basic virtual machine. Why PowerDNS? Because I needed an API, a proper admin-friendly web interface, user management, and LDAP integration. PowerDNS fully matched my requirements. Why Docker? Because I wanted some level of automation and IaC — Docker fits nicely in the middle, where you have several configs and docker-compose files fully describing the container configuration.

Migrating Websites from DirectAdmin to ISPConfig

Some time ago I faced a serious challenge: migrating a large number of similar websites from DirectAdmin to ISPConfig with maximum automation. The hosting platform was changed, and doing everything manually simply wasn’t an option. To solve this, I wrote a better CLI wrapper for ISPConfig that focuses on usability while reusing the default API functions underneath: ispconfig-cli

Docker persistent MAC address generation problem

When starting 150+ Docker containers with docker-compose, I encountered a strange problem: "Could not generate persistent MAC address".

How to Fix Email Date-Time After Migration to Dovecot

Many mail clients show wrong email receiving date-time because the file creation time is wrong after migration or restore. Here is a short review on how to fix it for Dovecot on ISPConfig.

User-friendly Bash script template

Sometimes you need a user-friendly interface for scripts. Using raw ARG0, ARG1… is messy. Here’s a clean example of parsing arguments like -h or -a=one in Bash.

CloudFlare API - list zone records

Easy and fast way get all domains or records via CloudFlare API

Moving WordPress redirects to nginx

We have pretty cool json from WordPress redirect table and we need move this action to nginx.

HAProxy in Front of InfluxDB

We have Telegraf sending stats to two InfluxDB servers, but our dashboard should point to only one. Additionally, Nagios monitors InfluxDB health. Here’s how we can combine a script, xinetd, and HAProxy to manage this.