Additional tomb inspection

This commit is contained in:
Bob Mottram 2016-07-28 08:27:22 +01:00
parent 75966b24ed
commit dc2947f7c5
1 changed files with 6 additions and 2 deletions

View File

@ -593,12 +593,16 @@ function setup_amnesic_tox_data {
fi fi
# make a temporary password # make a temporary password
TOMB_TOX_PASSWORD="$(openssl rand -base64 32 | cut -c1-30)"
tomb dig -s $TOMB_TOX_SIZE_MB /tmp/tox.tomb tomb dig -s $TOMB_TOX_SIZE_MB /tmp/tox.tomb
if [ ! -f /tmp/tox.tomb ]; then
echo "WARNING: Tomb did not install properly" >> /var/log/${PROJECT_NAME}.log
tomb >> /var/log/${PROJECT_NAME}.log
fi
TOMB_TOX_PASSWORD="$(openssl rand -base64 32 | cut -c1-30)"
tomb forge /mnt/ramdisk/tox.tomb.key --tomb-pwd "${TOMB_TOX_PASSWORD}" --unsafe tomb forge /mnt/ramdisk/tox.tomb.key --tomb-pwd "${TOMB_TOX_PASSWORD}" --unsafe
tomb lock /tmp/tox.tomb -k /mnt/ramdisk/tox.tomb.key --tomb-pwd "${TOMB_TOX_PASSWORD}" --unsafe tomb lock /tmp/tox.tomb -k /mnt/ramdisk/tox.tomb.key --tomb-pwd "${TOMB_TOX_PASSWORD}" --unsafe
tomb open /tmp/tox.tomb -k /mnt/ramdisk/tox.tomb.key --tomb-pwd "${TOMB_TOX_PASSWORD}" --unsafe tomb open /tmp/tox.tomb -k /mnt/ramdisk/tox.tomb.key --tomb-pwd "${TOMB_TOX_PASSWORD}" --unsafe
# clear the password # clear the temporary password
TOMB_TOX_PASSWORD= TOMB_TOX_PASSWORD=
if [ -d /media/tox ]; then if [ -d /media/tox ]; then