enabled -w write option
This commit is contained in:
parent
e8570e1a82
commit
59ab03c734
|
@ -19,6 +19,7 @@ help()
|
|||
echo " -u <username> Username to use for this virtualhost. Optional, defaults to first 8 alphanumeric characters of virtualhost."
|
||||
echo " -p <password> Password for username. Optional, random password generated if none specified."
|
||||
echo " -j Whether or not to jail the user. Optional, default is to not jail user."
|
||||
echo " -w Write user & mysql info to files. Warning! This inlcudes the unencrypted passwords."
|
||||
exit
|
||||
}
|
||||
|
||||
|
@ -86,7 +87,11 @@ if ! grep -q "^$username:" /etc/passwd; then
|
|||
password=`/usr/bin/pwgen 12 1`
|
||||
fi
|
||||
# add user
|
||||
/usr/local/bin/vhost-user-add.sh $username -p "$password"
|
||||
if [[ -n $write ]]; then
|
||||
/usr/local/bin/vhost-user-add.sh $username -p "$password" -w
|
||||
else
|
||||
/usr/local/bin/vhost-user-add.sh $username -p "$password"
|
||||
fi
|
||||
# if jail option is set then jail user
|
||||
if [[ -n $jail ]]; then
|
||||
/usr/local/bin/vhost-user-jail.sh $username > /dev/null 2>&1
|
||||
|
@ -97,4 +102,8 @@ fi
|
|||
/usr/local/bin/vhost-add.sh $domain $username > /dev/null 2>&1
|
||||
|
||||
# add mysql database
|
||||
/usr/local/bin/vhost-mysql-db-add.sh $domain > /dev/null 2>&1
|
||||
if [[ -n $write ]]; then
|
||||
/usr/local/bin/vhost-mysql-db-add.sh $domain -w > /dev/null 2>&1
|
||||
else
|
||||
/usr/local/bin/vhost-mysql-db-add.sh $domain > /dev/null 2>&1
|
||||
fi
|
||||
|
|
Loading…
Reference in New Issue
Block a user