mirror of
https://github.com/kxgx/2.13-Ink-screen-clock.git
synced 2026-03-15 07:03:16 +08:00
Update and rename stop.sh to e-Paper_clean.service
This commit is contained in:
14
bin/e-Paper_clean.service
Normal file
14
bin/e-Paper_clean.service
Normal file
@@ -0,0 +1,14 @@
|
||||
[Unit]
|
||||
Description=Run e-Paper clean on shutdown and reboot
|
||||
DefaultDependencies=no
|
||||
Before=shutdown.target
|
||||
Before=reboot.target
|
||||
|
||||
[Service]
|
||||
Type=oneshot
|
||||
ExecStart=/usr/bin/python3 /path/to/your/script/main.py
|
||||
RemainAfterExit=yes
|
||||
|
||||
[Install]
|
||||
WantedBy=shutdown.target
|
||||
WantedBy=reboot.target
|
||||
@@ -1,7 +0,0 @@
|
||||
#!/bin/bash
|
||||
dir=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
|
||||
pid=`ps -ef |grep $dir/main.py | grep -v grep |awk '{print $2}'`
|
||||
for id in $pid
|
||||
do
|
||||
kill -9 $id
|
||||
done
|
||||
Reference in New Issue
Block a user