Skip to content
Snippets Groups Projects
Commit 95fbf0f8 authored by Bob Mottram's avatar Bob Mottram
Browse files

tox bootstrap order

parent cd16631c
No related branches found
No related tags found
No related merge requests found
......@@ -592,6 +592,30 @@ function setup_amnesic_data {
echo "WARNING: ${tomb_name} tomb not found" >> $INSTALL_LOG
fi
tomb_name=tox-bootstrapd
if [ -f /etc/systemd/system/${tomb_name}.service ]; then
systemctl stop ${tomb_name}
fi
create_tomb ${tomb_name} $TOMB_TOX_BOOTSTRAP_SIZE_MB
if [ -d /media/${tomb_name} ]; then
if [ -d /var/lib/tox-bootstrapd ]; then
if [ ! -d /var/lib/tox-bootstrapd_base ]; then
mv /var/lib/tox-bootstrapd /var/lib/tox-bootstrapd_base
fi
fi
if [ -d /var/lib/tox-bootstrapd ]; then
shred -zu /var/lib/tox-bootstrapd/*
rm -rf /var/lib/tox-bootstrapd
fi
ln -s /media/${tomb_name} /var/lib/tox-bootstrapd
if [ -d /var/lib/tox-bootstrapd_base ]; then
cp -rp /var/lib/tox-bootstrapd_base/* /media/${tomb_name}
fi
echo "${tomb_name} tomb created" >> $INSTALL_LOG
else
echo "WARNING: ${tomb_name} tomb not found" >> $INSTALL_LOG
fi
tomb_name=tox
create_tomb ${tomb_name} $TOMB_TOX_SIZE_MB
if [ -d /media/${tomb_name} ]; then
......@@ -615,8 +639,8 @@ function setup_amnesic_data {
if [ ! -d /home/${MY_USERNAME}/.config ]; then
mkdir -p /home/${MY_USERNAME}/.config
fi
if [ -d /home/${MY_USERNAME}/.config/${tomb_name} ]; then
rm -rf /home/${MY_USERNAME}/.config/${tomb_name}
if [ -d /home/${MY_USERNAME}/.config/zeronet ]; then
rm -rf /home/${MY_USERNAME}/.config/zeronet
fi
ln -s /media/${tomb_name} /home/${MY_USERNAME}/.config/zeronet
chown -R ${MY_USERNAME}:${MY_USERNAME} /home/${MY_USERNAME}/.config
......@@ -642,23 +666,6 @@ function setup_amnesic_data {
else
echo "WARNING: ${tomb_name} tomb not found" >> $INSTALL_LOG
fi
tomb_name=tox-bootstrapd
create_tomb ${tomb_name} $TOMB_TOX_BOOTSTRAP_SIZE_MB
if [ -d /media/${tomb_name} ]; then
if [ -d /var/lib/tox-bootstrapd ]; then
if [ ! -d /var/lib/tox-bootstrapd_base ]; then
mv /var/lib/tox-bootstrapd /var/lib/tox-bootstrapd_base
fi
fi
ln -s /media/${tomb_name} /var/lib/tox-bootstrapd
if [ -d /var/lib/tox-bootstrapd_base ]; then
cp -rp /var/lib/tox-bootstrapd_base/* /media/${tomb_name}
fi
echo "${tomb_name} tomb created" >> $INSTALL_LOG
else
echo "WARNING: ${tomb_name} tomb not found" >> $INSTALL_LOG
fi
}
# whether to reset the identity
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment