Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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
done
pure-pw mkdb
# for making supervisord think that process is alive
sleep infinity
exit
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.