Skip to content

Instantly share code, notes, and snippets.

@CharlesMAtkinson
CharlesMAtkinson / Introduction.md
Created March 11, 2026 13:50
syncthing: shared vfat file system on a loop device

syncthing: shared vfat file system on a loop device

When file systems are to be shared with Android devices, the file system should be vfat to ensure other devices cannot create invalid names.

When syncthing is set up on a Linux VPS, all storage apart from the EFI boot partition is typically used for an ext4 file system. A vfat file system can be created by using a loop device.

/etc/fstab's column fs_passno cannot be used to fsck a loop device.

The syncthing service (a user service) must not start until the vfat file system is mounted and must be stopped before it is unmounted. No way was found to implement that dependency using standard systemd facilities.

@CharlesMAtkinson
CharlesMAtkinson / Introduction.md
Created February 18, 2026 10:32
Logcheck systemd files (developed and tested on Debian Trixie)

Modifying logcheck's Systemd Service and Timer

This gist is about modifying logcheck's systemd service and timer facilities so:

  • No email is sent for messages generated during the first minute of boot
  • logcheck is run at approximately hour intervals after boot
  • logcheck is run with nice 19 to minimize its performance impact on other processes

A new service and timer is provided for the logcheck run at boot:

  • logcheck-at-boot.service to be installed as /etc/systemd/system/logcheck-at-boot.service
  • logcheck-at-boot.timer to be installed as /etc/systemd/system/logcheck-at-boot.timer