Add a service to restart python3-validity on suspend/resume. Thanks to @flops
This commit is contained in:
parent
81791030e8
commit
504f5316b5
4 changed files with 17 additions and 6 deletions
3
.gitignore
vendored
3
.gitignore
vendored
|
|
@ -2,9 +2,8 @@ debian/tmp/
|
|||
debian/debhelper-build-stamp
|
||||
debian/python3-validity/
|
||||
debian/python3-validity.substvars
|
||||
debian/python3-validity.prerm.debhelper
|
||||
debian/python3-validity.postinst.debhelper
|
||||
debian/files
|
||||
debian/*.debhelper
|
||||
debian/.debhelper/
|
||||
|
||||
__pycache__
|
||||
|
|
|
|||
11
debian/python3-validity-suspend-restart.service
vendored
Normal file
11
debian/python3-validity-suspend-restart.service
vendored
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
[Unit]
|
||||
Description=Restart python-validity after resume
|
||||
After=suspend.target hibernate.target
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
ExecStart=/bin/systemctl --no-block restart python3-validity.service
|
||||
|
||||
[Install]
|
||||
WantedBy=suspend.target hibernate.target
|
||||
|
||||
6
debian/python3-validity.prerm
vendored
6
debian/python3-validity.prerm
vendored
|
|
@ -2,9 +2,9 @@
|
|||
|
||||
set -e
|
||||
|
||||
if [ -x "/usr/bin/deb-systemd-invoke" ] && [ "$1" = remove ]; then
|
||||
deb-systemd-invoke stop 'python3-validity.service' || true
|
||||
fi
|
||||
#if [ -x "/usr/bin/deb-systemd-invoke" ] && [ "$1" = remove ]; then
|
||||
# deb-systemd-invoke stop 'python3-validity.service' || true
|
||||
#fi
|
||||
|
||||
#DEBHELPER#
|
||||
|
||||
|
|
|
|||
3
debian/rules
vendored
3
debian/rules
vendored
|
|
@ -6,7 +6,8 @@
|
|||
dh $@ --with python3 --buildsystem=pybuild
|
||||
|
||||
override_dh_installsystemd:
|
||||
dh_installsystemd
|
||||
dh_installsystemd --name=python3-validity
|
||||
dh_installsystemd --name=python3-validity-suspend-restart
|
||||
|
||||
|
||||
override_dh_auto_install:
|
||||
|
|
|
|||
Loading…
Reference in a new issue