summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYves Fischer <yvesf-git@xapek.org>2018-01-05 12:14:12 +0100
committerYves Fischer <yvesf-git@xapek.org>2019-01-29 01:17:32 +0100
commitb49a80e2a63c6cd7e627192a6e62133debfc5cd0 (patch)
treef4dfa49633add9e58e7f2bd2cf5c086346e70c1a
parentf246eaece0b8885f64856bee93c87a0e2b5e5976 (diff)
downloadbatteriewarner-b49a80e2a63c6cd7e627192a6e62133debfc5cd0.tar.gz
batteriewarner-b49a80e2a63c6cd7e627192a6e62133debfc5cd0.zip
systemd unit registration and automatic activation
-rw-r--r--.gitignore4
-rw-r--r--debian/batteriewarner.service9
-rw-r--r--debian/control2
-rwxr-xr-xdebian/rules2
4 files changed, 13 insertions, 4 deletions
diff --git a/.gitignore b/.gitignore
index 110686c..d72a31c 100644
--- a/.gitignore
+++ b/.gitignore
@@ -5,6 +5,6 @@
Cargo.lock
debian/.debhelper
-debian/batteriewarner.debhelper.log
+debian/batteriewarner.*debhelper*
debian/batteriewarner.substvars
-debian/batteriewarner \ No newline at end of file
+debian/batteriewarner/ \ No newline at end of file
diff --git a/debian/batteriewarner.service b/debian/batteriewarner.service
new file mode 100644
index 0000000..7b6b670
--- /dev/null
+++ b/debian/batteriewarner.service
@@ -0,0 +1,9 @@
+[Unit]
+Description=Batteriewarner Daemon
+
+[Service]
+Type=simple
+ExecStart=/usr/sbin/batteriewarner
+
+[Install]
+WantedBy=multi-user.target \ No newline at end of file
diff --git a/debian/control b/debian/control
index 4a3a94f..3715ba7 100644
--- a/debian/control
+++ b/debian/control
@@ -1,6 +1,6 @@
Source: batteriewarner
Maintainer: Yves Fischer <yvesf+debian@xapek.org>
-Build-Depends: debhelper (>= 9), dh-cargo, rustc
+Build-Depends: debhelper (>= 9), dh-cargo, rustc, dh-systemd (>= 1.5)
Package: batteriewarner
Architecture: any
diff --git a/debian/rules b/debian/rules
index 8f6d5dc..56e44e0 100755
--- a/debian/rules
+++ b/debian/rules
@@ -1,7 +1,7 @@
#!/usr/bin/make -f
%:
- dh $@
+ dh ${@} --with=systemd
override_dh_auto_clean:
cargo clean