tox bootstrap order
This commit is contained in:
parent
cd16631cde
commit
95fbf0f84a
|
@ -592,6 +592,30 @@ function setup_amnesic_data {
|
||||||
echo "WARNING: ${tomb_name} tomb not found" >> $INSTALL_LOG
|
echo "WARNING: ${tomb_name} tomb not found" >> $INSTALL_LOG
|
||||||
fi
|
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
|
tomb_name=tox
|
||||||
create_tomb ${tomb_name} $TOMB_TOX_SIZE_MB
|
create_tomb ${tomb_name} $TOMB_TOX_SIZE_MB
|
||||||
if [ -d /media/${tomb_name} ]; then
|
if [ -d /media/${tomb_name} ]; then
|
||||||
|
@ -615,8 +639,8 @@ function setup_amnesic_data {
|
||||||
if [ ! -d /home/${MY_USERNAME}/.config ]; then
|
if [ ! -d /home/${MY_USERNAME}/.config ]; then
|
||||||
mkdir -p /home/${MY_USERNAME}/.config
|
mkdir -p /home/${MY_USERNAME}/.config
|
||||||
fi
|
fi
|
||||||
if [ -d /home/${MY_USERNAME}/.config/${tomb_name} ]; then
|
if [ -d /home/${MY_USERNAME}/.config/zeronet ]; then
|
||||||
rm -rf /home/${MY_USERNAME}/.config/${tomb_name}
|
rm -rf /home/${MY_USERNAME}/.config/zeronet
|
||||||
fi
|
fi
|
||||||
ln -s /media/${tomb_name} /home/${MY_USERNAME}/.config/zeronet
|
ln -s /media/${tomb_name} /home/${MY_USERNAME}/.config/zeronet
|
||||||
chown -R ${MY_USERNAME}:${MY_USERNAME} /home/${MY_USERNAME}/.config
|
chown -R ${MY_USERNAME}:${MY_USERNAME} /home/${MY_USERNAME}/.config
|
||||||
|
@ -642,23 +666,6 @@ function setup_amnesic_data {
|
||||||
else
|
else
|
||||||
echo "WARNING: ${tomb_name} tomb not found" >> $INSTALL_LOG
|
echo "WARNING: ${tomb_name} tomb not found" >> $INSTALL_LOG
|
||||||
fi
|
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
|
# whether to reset the identity
|
||||||
|
|
Loading…
Reference in New Issue