Remove previous blog content when creating new identity

This commit is contained in:
Bob Mottram 2016-09-09 12:33:36 +01:00
parent 59d053e4cc
commit ce30f1680f
No known key found for this signature in database
GPG Key ID: 0452CC7CEA982E38
1 changed files with 12 additions and 2 deletions

View File

@ -755,7 +755,6 @@ function setup_ipfs {
IPFS_PUBLIC=/home/$MY_USERNAME/.ipfs-public
su -c "systemctl --user enable ipfs" - $MY_USERNAME
su -c "systemctl --user start ipfs" - $MY_USERNAME
if [ -f $CURRENT_BLOG_INDEX ]; then
shred -zu $CURRENT_BLOG_INDEX
@ -766,9 +765,20 @@ function setup_ipfs {
rm -rf /home/$MY_USERNAME/Public
fi
if [ -d /home/$MY_USERNAME/CreateBlog/content ]; then
shred -zu /home/$MY_USERNAME/CreateBlog/content/*
fi
if [ -d /home/$MY_USERNAME/.ipfs ]; then
shred -zu /home/$MY_USERNAME/.ipfs/config
rm -rf /home/$MY_USERNAME/.ipfs
su -c "systemctl --user restart ipfs" - $MY_USERNAME
else
su -c "systemctl --user start ipfs" - $MY_USERNAME
fi
if [ -f /home/$MY_USERNAME/.blog-index ]; then
shred -zu /home/$MY_USERNAME/.blog-index
fi
if [ -f /home/$MY_USERNAME/.ipfs-id ]; then
@ -862,7 +872,7 @@ if [ -f $MESH_INSTALL_SETUP ]; then
if [ ! $set_new_identity ]; then
# sleep in order to allow other daemons to start up
sleep 15
sleep 5
fi
# clear the install log