This commit is contained in:
Bob Mottram 2016-07-29 22:46:13 +01:00
parent 16a5e7db60
commit c32179f8d7
1 changed files with 10 additions and 3 deletions

View File

@ -593,9 +593,16 @@ function mesh_tox_client {
echo $"Toxic client compile $(($duration / 60)) minutes and $(($duration % 60)) seconds elapsed." echo $"Toxic client compile $(($duration / 60)) minutes and $(($duration % 60)) seconds elapsed."
# create a tox user # create a tox user
if [ ! -f /home/${MY_USERNAME}/.config/tox/data.tox ]; then if [ ${rootdir} ]; then
toxid -u $MY_USERNAME -n data if [ ! -f ${rootdir}/home/${MY_USERNAME}/.config/tox/data.tox ]; then
chown -R ${MY_USERNAME}:${MY_USERNAME} /home/${MY_USERNAME}/.config chroot ${rootdir} toxid -u $MY_USERNAME -n data
chroot ${rootdir} chown -R ${MY_USERNAME}:${MY_USERNAME} /home/${MY_USERNAME}/.config
fi
else
if [ ! -f /home/${MY_USERNAME}/.config/tox/data.tox ]; then
toxid -u $MY_USERNAME -n data
chown -R ${MY_USERNAME}:${MY_USERNAME} /home/${MY_USERNAME}/.config
fi
fi fi
} }