install OpenVpn and Administrate it

it is really simple

run as admin and follow.

wget https://git.io/vpn -O openvpn-install.sh && bash openvpn-install.sh

to add an new user

./openvpn-install.sh
Looks like OpenVPN is already installed

What do you want to do?
   1) Add a new user
   2) Revoke an existing user
   3) Remove OpenVPN
   4) Exit

at the end this script is generating you an vpn config, install all the programs and generate all SSL certs for you.

all the configs you can find under

/root/

 

Disabling the email service for AKA or subdomains

# Status anzeigen lassen
/usr/local/psa/bin/domain -i example.com | grep “Mail service”
Mail service: On
# E-Mail-Dienst deaktivieren
/usr/local/psa/bin/domain -u example.com -mail_service false
SUCCESS: Update of domain 'example.com' completed.
 
/usr/local/psa/bin/domain -i example.com | grep “Mail service”
Mail service: Off

In the case, that you want to activate it again this goes as follows:

/usr/local/psa/bin/domain -u example.com -mail_service true
/usr/local/psa/bin/domain -i example.com | grep “Mail service”
Mail service: On

 

WordPress autoupdater

install wp-cli -> http://wp-cli.org/

use this script

#!/bin/bash

updater(){
        wp core update --allow-root
        wp core update-db --allow-root
        wp plugin update --all --allow-root
        wp theme update --all --allow-root
        wp core language update --allow-root
        CGROUP=$(stat -c '%G' wp-cron.php)
        CUSER=$(stat -c '%U' wp-cron.php)
        chown $CUSER:$CGROUP ./* -Rf
}

for i in $(find /var/www/vhosts -name wp-cron.php); do
        wpdir=$(echo $i | sed -r 's/wp-cron.php//g')
        echo $wpdir
        cd $wpdir
        updater
done