Removing tox settings as a function

This commit is contained in:
Bob Mottram 2016-07-27 20:51:57 +01:00
parent 5e5630cc8f
commit 5de7b0cf29
1 changed files with 13 additions and 7 deletions

View File

@ -465,6 +465,16 @@ function configure_zeronet_id {
echo $'Update of ZeroID completed' >> $INSTALL_LOG
}
function amnesic_remove_tox {
echo $'Clearing qtox client settings' >> $INSTALL_LOG
if [ -d /home/${MY_USERNAME}/.config/tox ]; then
shred -zu /home/${MY_USERNAME}/.config/tox/*.tox
shred -zu /home/${MY_USERNAME}/.config/tox/*.db
shred -zu /home/${MY_USERNAME}/.config/tox/*.ini
rm -rf /home/${MY_USERNAME}/.config/tox
fi
}
function configure_toxcore {
echo $'Configuring toxcore' >> $INSTALL_LOG
@ -491,13 +501,7 @@ function configure_toxcore {
echo "$TOX_PUBLIC_KEY" > $TOX_BOOTSTRAP_ID_FILE
echo $'Configured toxcore' >> $INSTALL_LOG
echo $'Clearing toxic client settings' >> $INSTALL_LOG
if [ -d /home/${MY_USERNAME}/.config/tox ]; then
shred -zu /home/${MY_USERNAME}/.config/tox/*.tox
shred -zu /home/${MY_USERNAME}/.config/tox/*.db
shred -zu /home/${MY_USERNAME}/.config/tox/*.ini
rm -rf /home/${MY_USERNAME}/.config/tox
fi
amnesic_remove_tox
echo $'toxic client configured' >> $INSTALL_LOG
}
@ -537,6 +541,8 @@ function mesh_amnesic {
echo '#!/bin/bash' > /usr/bin/amnesic
echo '' >> /usr/bin/amnesic
echo "shred -zu /var/log/${PROJECT_NAME}*" >> /usr/bin/amnesic
echo '' >> /usr/bin/amnesic
echo 'MY_USERNAME=$1' >> /usr/bin/amnesic
echo -n "${PROJECT_NAME}-image-mesh " >> /usr/bin/amnesic
echo '$MY_USERNAME amnesic' >> /usr/bin/amnesic