Forked from janxb/ajenti_additional_ftp_users.sh
Last active
August 29, 2015 14:24
-
-
Save bbbenji/76919713e2b35d1dbd12 to your computer and use it in GitHub Desktop.
Additional FTP users for Ajenti
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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