Adding a tox user
This commit is contained in:
parent
f4f50eaf02
commit
3c920b5c44
|
@ -61,6 +61,19 @@ function remove_user_tox {
|
|||
fi
|
||||
}
|
||||
|
||||
function add_user_tox {
|
||||
new_username="$1"
|
||||
new_user_password="$2"
|
||||
|
||||
USER_TOX_FILE=/home/${new_username}/.config/tox/data.tox
|
||||
if [ ! -f $USER_TOX_FILE ]; then
|
||||
mkdir -p /home/${new_username}/.config/tox
|
||||
chown -R ${new_username}:${new_username} /home/${new_username}/.config
|
||||
su -c "toxid -u ${new_username} -n data" - $new_username
|
||||
su -c "toxid --setuser ${new_username}" - $new_username
|
||||
fi
|
||||
}
|
||||
|
||||
function run_client_tox {
|
||||
# create a tox user
|
||||
USER_TOX_FILE=/home/${USER}/.config/tox/data.tox
|
||||
|
|
Loading…
Reference in New Issue