forked from axiom-team/astrXbian
NEW ~/.ipfs/config.new => restarting IPFS daemon (not too often as 6h)
This commit is contained in:
parent
f277c215d5
commit
4cb5df1775
|
@ -88,7 +88,6 @@ weeknumber=$(date +%V)
|
|||
# WAKEUP TIME
|
||||
if [[ ! -f /tmp/A_Station_ON ]]; then
|
||||
echo "onheure=$heure; onminute=$minute; ontimebar=$timebar" > /tmp/A_Station_ON
|
||||
[[ -f /home/$YOU/.zen/A_Station_ON ]] && cp /home/$YOU/.zen/A_Station_ON /tmp/A_Station_ON && rm /home/$YOU/.zen/A_Station_ON
|
||||
else
|
||||
source /tmp/A_Station_ON
|
||||
old=$ontimebar
|
||||
|
@ -206,8 +205,9 @@ if [[ $(($runtime % 725)) == 0 || "$runtime" == "5" ]]; then
|
|||
kill -9 $(ps auxf --sort=+utime | grep -w gchange_INIT.sh | grep -v -E 'color=auto|grep' | tail -n 1 | awk '{print $2}') && echo "KILLING gchange_INIT.sh"
|
||||
$MY_PATH/zen/gchange_INIT.sh 2>&1 > /home/${YOU}/.zen/ipfs/.${IPFSNODEID}/.log.gchange_INIT.txt
|
||||
fi
|
||||
# If NEW ~/.ipfs/config.new => restarting IPFS daemon
|
||||
if [[ -f ~/.ipfs/config.new && $(diff ~/.ipfs/config.new ~/.ipfs/config) ]]; then
|
||||
# If NEW ~/.ipfs/config.new => restarting IPFS daemon (not too often as 6h)
|
||||
if [[ -f ~/.ipfs/config.new && $(diff ~/.ipfs/config.new ~/.ipfs/config) && $runtime -gt 360 ]]; then
|
||||
echo "onheure=$heure; onminute=$minute; ontimebar=$timebar" > /tmp/A_Station_ON
|
||||
cp ~/.ipfs/config.new ~/.ipfs/config
|
||||
[[ -f /etc/sudoers.d/systemctl ]] && sudo systemctl restart ipfs && exit 0
|
||||
[[ ${YOU} == "xbian" ]] && sudo service ipfs restart && exit 0
|
||||
|
|
Loading…
Reference in New Issue