I've acquired an anycast IP address and I wanted a way to sync my websites across each box without having to think about it; upload to a single box then be synchronized across all boxes. Sure I could use a bash script that rsync's across all boxes, Rclone, a git hook, etc, but I wanted something simpler;
But to know if I could achieve these goals in a reasonable time, I decided to try something simple first, neocitiesfs.pl
.
After writing neocitiesfs.pl
, I am reasonably confident that I can handle these basic goals. Honestly, writing a virtual filesystem with Fuse is shockingly easy. Fuse API (or the Fuse module I was using) hid away most of the complexities making it easy to program this thing.
Some caveats with neocitiesfs.pl
:
.bash_history
and viewable with process managers
--config
can 'hide' it but you'll need to put some smart DAC perms on it%files
won't be shared between threads(?)/processes(?) (don't know that much about multithreading sadly)get_dir()
and read each file, one by one, for some reason (maybe to make sure it can view the image then add it to a 'playlist' if the user presses the arrow key? But then if you press the arrow key, it tries to read the image anyway (annoying)!)I don't really see that many people using it but I thought it's a neat project.
Note: this won't work on windows, but maybe if you install WSL or something it could, idk. I won't test it :)
"This is simpler?" ... maybe not but it is very cool!