I am a user of FreeFileSync, and I want to use RealtimeSync as a Linux Daemon (service), because I have many folders to watch and I would like a automated synchronization. I have Ubuntu 14.04 64 bits, and many user accounts.
I tried to run RealtimeSync with a script when I logged in, but the RealtimeSync's process was duplicated when there were several users logged in. And if I checked if the RealtimeSync's process was running before starting it at each login, it was working unless I ended the first session logged in, because the RealtimeSync's process was dependent on it, attached on it. And there was no more automated synchronization if the other sessions were already opened.
The script started at each login:
#!/bin/bash
# RealtimeSync is started as root without password (sudoers)
pidof RealtimeSync >/dev/null
if [[ $? -ne 0 ]] ; then
gksudo "/usr/bin/RealtimeSync '/home/user/Applications/Synchronisation_PC_NAS/FreefileSync_batch/Gestion PC.ffs_batch'" &
gksudo "/usr/bin/RealtimeSync '/home/user/Applications/Synchronisation_PC_NAS/FreefileSync_batch/Messagerie.ffs_batch'"
fi
exit 0 ;
My current daemon:
#!/bin/bash
/usr/bin/RealtimeSync '/home/user/Applications/Synchronisation_PC_NAS/FreefileSync_batch/Gestion PC.ffs_batch' &
/usr/bin/RealtimeSync '/home/user/Applications/Synchronisation_PC_NAS/FreefileSync_batch/Messagerie.ffs_batch'
exit 0 ;
Thanks for your help in advance,
al373.