I want to create system service, which (for each user) will be started just after user login and do some job inside user's $HOME with root privelegies.
Here is sample service:
[Unit]
Description= My User service
After=dbus.service
[Service]
StandardError=journal
ExecStart=/bin/sh -c "cp -r $HOME/.config /root/backup/$USER/$(date)/" #<- just a sample root task
[Install]
WantedBy=default.target
But $HOME or $USER variables are unavailable. How to access them?