[Unit] Description=Moodle Import Worker [Service] Type=oneshot # Needs to run as the user Moodle runs as User=www-data Group=www-data WorkingDirectory=/opt/moodle-import-worker/ ExecStart=/usr/bin/env python3 /opt/moodle-import-worker/worker.py ExecStartPost=/bin/sh -c "/bin/rm -r /var/www/html/moodledata/temp/backup/*"