Skip to content

Instantly share code, notes, and snippets.

#!/bin/bash
set -e
apt-get install $(dpkg -l | grep php7.1- | awk '{print $2}' | sed -e 's/7.1/7.2/g')
@janxb
janxb / migrate-legacy-mailcow-to-dockerized.sh
Last active October 7, 2017 17:43
This Scripts migrates a legacy mailcow instance to a new mailcow.dockerized one. Domains, Users, SOGo-Settings, Forwardings and Mails are migrated.
#!/bin/bash
set -e
cd ~/mailcow-dockerized
DBUSER=mailcow
DBPASS=xxxxxxxxxxxxxxxxxxxx
DBNAME=mailcow
DBHOST=mailcow.lxd
@janxb
janxb / ajenti_additional_ftp_users.sh
Last active June 9, 2017 07:58
A Shell Script for adding additional FTP-Users to Ajenti
#!/bin/bash
SET_USERS="usernameone:password:/path/to/web/folder usernametwo:password:/path/to/second/folder"
IFS=' ' read -a USERS <<< "${SET_USERS}"
for SET_USER in ${USERS[@]}; do
IFS=':' read -a USER <<< "${SET_USER}"
NAME=${USER[0]};
PASS=${USER[1]};
DIR=${USER[2]};
(echo $PASS; echo $PASS) | pure-pw useradd $NAME -u www-data -g www-data -d $DIR