Tweak the systemd service file to add Before=shutdown.target