Create tox user from control panel

This commit is contained in:
Bob Mottram 2016-07-29 23:04:50 +01:00
parent c32179f8d7
commit 53e1ae04e7
2 changed files with 9 additions and 14 deletions

View File

@ -591,19 +591,6 @@ function mesh_tox_client {
fi
duration=$SECONDS
echo $"Toxic client compile $(($duration / 60)) minutes and $(($duration % 60)) seconds elapsed."
# create a tox user
if [ ${rootdir} ]; then
if [ ! -f ${rootdir}/home/${MY_USERNAME}/.config/tox/data.tox ]; then
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
}
function enable_tox_repo {

View File

@ -905,6 +905,14 @@ function sign_keys {
esac
}
function run_tox_client {
# create a tox user
if [ ! -f /home/${USER}/.config/tox/data.tox ]; then
toxid -u $USER -n data
fi
toxic -f /home/${USER}/.config/tox/data.tox --force-tcp --SOCKS5-proxy 127.0.0.1 9050
}
function menu_top_level {
while true
do
@ -933,7 +941,7 @@ function menu_top_level {
case $(cat $data) in
1) mutt;;
2) menu_email;;
3) toxic --force-tcp --SOCKS5-proxy 127.0.0.1 9050;;
3) run_tox_client;;
4) torify profanity;;
5) irssi;;
6) torify elinks;;