I have a Fedora 23 Machine.
I have a directory/file synchronizing bash script that synchronizes my local /home directory to a remote directory (in a NAS machine). I run it manually but I would like to create a systemd service and make it more flexible, since other people use my PC with their own user credentials, I 'd like to know when a user is logged in and start my service afterwards.
Is there something I can do from my service's systemd file or will I have to check that from my code in the script?
I only need to make sure that I have access to environment variables (like $USER) and to run it as a service.
My main source of documentation is this link https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/7/html/System_Administrators_Guide/sect-Managing_Services_with_systemd-Unit_Files.html