[Unit] Description=Update user profile picture from Active Directory [Service] Type=simple # Environment variables for ldapsearch Environment="LDAP_URI=ldaps://dc01.contoso.com:636" Environment="LDAP_BASE=DC=contoso,DC=com" # Wait 15 minutes to allow time for the user to connect to the company network. ExecStartPre=/bin/sleep 900 ExecStart=/usr/local/bin/update_face_from_ad [Install] WantedBy=default.target