CLEAN OLD BAD DIR/FILES

This commit is contained in:
qo-op 2021-05-19 14:31:32 +02:00
parent 194790b3bf
commit 577e220187
1 changed files with 13 additions and 1 deletions

View File

@ -110,6 +110,18 @@ if [[ $(($minute % 15)) == 0 ]]; then
# echo "MAJ Vstream settings"
# fi
# CLEAN AND REMOVE BAD DIRECTORIES
[[ -d ~/.zen/ipfs/astroport ]] && rm -Rf ~/.zen/ipfs/astroport
[[ -d ~/.zen/ipfs_swarm/astroport ]] && rm -Rf ~/.zen/ipfs_swarm/astroport
[[ -d ~/.zen/ipfs/xbian ]] && rm -Rf ~/.zen/ipfs/xbian
[[ -d ~/.zen/ipfs_swarm/xbian ]] && rm -Rf ~/.zen/ipfs_swarm/xbian
[[ -d ~/.zen/ipfs_swarm/PIN ]] && rm -Rf ~/.zen/ipfs_swarm/PIN
## CLEANING OLD BAD FILES
rm ~/.zen/ipfs/*
rm ~/.zen/ipfs/.*
rm ~/.zen/ipfs_swarm/*
rm ~/.zen/ipfs_swarm/.*
########## OPEN OR CLOSE SSH ACCESS #################
# [[ "$(ipfs p2p ls | grep $G1PUB-ssh)" == "" ]] && sleep $((1 + RANDOM % 10)) && ~/.zen/astrXbian/zen/ssh_forward2onelove.sh # OPEN-SSH
# [[ "$(ipfs p2p ls | grep $G1PUB-ssh)" != "" ]] && sleep $((1 + RANDOM % 10)) && ~/.zen/astrXbian/zen/ssh_forward2onelove.sh # CLOSE-SSH
@ -153,7 +165,7 @@ fi
if [[ "$timebar" == "12:12" || "$timebar" == "00:12" || $(($runtime % 720)) == 0 ]]; then
#### timebar DESYNC
# Restarting IPFS daemon
[[ -f /etc/sudoers.d/systemctl || "$USER" == "xbian" ]] && sudo systemctl restart ipfs
[[ -f /etc/sudoers.d/systemctl || "$USER" == "xbian" ]] && sudo systemctl restart ipfs && sleep 10
sleep $((1 + RANDOM % 5))
##################################################################