#!/usr/bin/env bash # pre action or use ExecStartPre /usr/bin/restic backup \ $(echo $RESTIC_ADDITIONAL_CREATE_PARAMS) \ --exclude-file "${RESTIC_FILE_EXCLUDE}" \ --files-from "${RESTIC_FILE_INCLUDE}" /usr/bin/restic forget $(echo $RESTIC_KEEP) # post action or adapt ExecStartPost