diff --git a/src/freedombone-app-tox b/src/freedombone-app-tox index 4106575d..61e11792 100755 --- a/src/freedombone-app-tox +++ b/src/freedombone-app-tox @@ -585,8 +585,10 @@ EOF echo '/usr/local/bin/zeronetavahi 2> /dev/null' >> $MESH_SYNC_COMMAND chmod +x $MESH_SYNC_COMMAND - cron_add_mins 1 "$MESH_SYNC_COMMAND" - cron_add_mins 1 "( sleep 30 ; $MESH_SYNC_COMMAND )" + if ! grep -q "mesh-sync" ${rootdir}/etc/crontab; then + echo "*/1 * * * * root /usr/bin/mesh-sync" >> ${rootdir}/etc/crontab + echo "*/1 * * * * root ( sleep 30 ; /usr/bin/mesh-sync )" >> ${rootdir}/etc/crontab + fi } function mesh_tox_client { diff --git a/src/freedombone-app-zeronet b/src/freedombone-app-zeronet index a312f410..b87440df 100755 --- a/src/freedombone-app-zeronet +++ b/src/freedombone-app-zeronet @@ -561,8 +561,10 @@ function mesh_zeronet { echo '/usr/local/bin/zeronetavahi 2> /dev/null' >> $MESH_SYNC_COMMAND chmod +x $MESH_SYNC_COMMAND - cron_add_mins 1 "$MESH_SYNC_COMMAND" - cron_add_mins 1 "( sleep 30 ; $MESH_SYNC_COMMAND )" + if ! grep -q "mesh-sync" ${rootdir}/etc/crontab; then + echo "*/1 * * * * root /usr/bin/mesh-sync" >> ${rootdir}/etc/crontab + echo "*/1 * * * * root ( sleep 30 ; /usr/bin/mesh-sync )" >> ${rootdir}/etc/crontab + fi chroot "$rootdir" systemctl enable tracker.service chroot "$rootdir" systemctl enable zeronet.service