cron entries in rootdir

This commit is contained in:
Bob Mottram 2016-08-09 22:26:38 +01:00
parent 1e67bee0fb
commit 8e8cb6ed56
No known key found for this signature in database
GPG Key ID: 0452CC7CEA982E38
2 changed files with 8 additions and 4 deletions

View File

@ -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 {

View File

@ -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