You are not logged in.

#1 2021-04-30 22:10:45

korimitsu
Member
Registered: 2016-08-14
Posts: 194

Run a command before shutdown

How could I get to run certain script before every shut down /reboot, halt (not suspension or hibernation). Do it the first thing before filesystems are unmounted. Is there any difference if the script need to be run as superuser or not? Say the script is at /usr/local/bin/pintouch

Offline

#2 2021-05-01 06:35:29

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 77,523

Re: Run a command before shutdown

Look eg. at /usr/lib/systemd/system/systemd-tmpfiles-clean.service

Online

Board footer

Powered by FluxBB