I have recently installed FreeFileSync on a my PC and managed to to getting the RealTimeSync working perfectly fine. All that is left to do is automatically call the script at start up. Initially, I used Cron with the @reboot parameter but that did not work out. So I decided to use systemd instead. I have created a user service file called sync.service which I have enabled and works perfectly fine when manually called via the systemctl --user start sync_1 command. However, it encounters errors on startup. Could anybody please? I am not sure where I am going wrong.
[Unit] After=network.service [Service] Environment="DISPLAY=:0" ExecStart=/home/user/Desktop/sync.sh [Install] WantedBy=default.target
Below is the error I encounter when I check the status of the systemd file after startup.
sync_1.service Loaded: loaded (/etc/xdg/systemd/user/sync_1.service; enabled; vendor preset: enabled) Active: failed (Result: exit-code) since Sun 2020-06-14 21:19:19 BST; 47s ago Process: 1859 ExecStart=/home/user/Desktop/sync.sh (code=exited, status=255/EXCEPTION) Main PID: 1859 (code=exited, status=255/EXCEPTION)