diff --git a/src/freedombone-app-syncthing b/src/freedombone-app-syncthing index ac806e82..2cb1629e 100755 --- a/src/freedombone-app-syncthing +++ b/src/freedombone-app-syncthing @@ -280,12 +280,10 @@ function mesh_install_syncthing { chroot "$rootdir" echo '' >> /etc/systemd/system/syncthing.service chroot "$rootdir" echo '[Install]' >> /etc/systemd/system/syncthing.service chroot "$rootdir" echo 'WantedBy=multi-user.target' >> /etc/systemd/system/syncthing.service - chroot "$rootdir" systemctl enable syncthing - chroot "$rootdir" systemctl daemon-reload + # Note: don't enable the daemon if ! grep -q "syncthing" $rootdir/etc/crontab; then - chroot "$rootdir" echo "*/1 * * * * root /usr/local/bin/${PROJECT_NAME}-syncthing > /dev/null" >> /etc/crontab - chroot "$rootdir" systemctl restart cron + echo "*/1 * * * * root /usr/local/bin/${PROJECT_NAME}-syncthing > /dev/null" >> $rootdir/etc/crontab fi echo 'mesh_install_syncthing'