如何在关机前执行脚本?
Tofloor
poster avatar
deepin-chinaren
deepin
2019-07-23 05:20
Author
如何在关机前执行脚本?
Reply Favorite View the author
All Replies
avatar
jianguo922
deepin
2019-07-23 05:46
#1
我也想知道         
Reply View the author
avatar
funtoo
deepin
2019-07-23 05:54
#2
编写个类似的systemd service文件
  1. [Unit]
  2. Description=foobar
  3. Before=shutdown.target

  4. [Service]
  5. ExecStop=/foo/bar.sh
  6. RemainAfterExit=yes

  7. [Install]
  8. WantedBy=multi-user.target
Copy the Code
然后enable一下。
Reply View the author