[Unit] Description=Run my custom task at shutdown only After=syslog.target [Service] Type=oneshot ExecStart=/usr/bin/python3 /usr/bin/lcd_control_start.py RemainAfterExit=yes [Install] WantedBy=basic.target