[Unit] Description=Exec before shutdown [Service] Type=oneshot RemainAfterExit=true ExecStart=/bin/true ExecStop=/root/bin/shutdown.sh [Install] WantedBy=multi-user.target