summaryrefslogtreecommitdiff
path: root/raveos-updater/raveos-updater.install
diff options
context:
space:
mode:
Diffstat (limited to 'raveos-updater/raveos-updater.install')
-rw-r--r--raveos-updater/raveos-updater.install20
1 files changed, 20 insertions, 0 deletions
diff --git a/raveos-updater/raveos-updater.install b/raveos-updater/raveos-updater.install
new file mode 100644
index 0000000..f2993fd
--- /dev/null
+++ b/raveos-updater/raveos-updater.install
@@ -0,0 +1,20 @@
+_enable() {
+ if command -v systemctl >/dev/null 2>&1; then
+ systemctl daemon-reload >/dev/null 2>&1 || true
+ systemctl enable --now raveos-updater.timer >/dev/null 2>&1 || true
+ fi
+}
+
+post_install() {
+ _enable
+}
+
+post_upgrade() {
+ _enable
+}
+
+pre_remove() {
+ if command -v systemctl >/dev/null 2>&1; then
+ systemctl disable --now raveos-updater.timer >/dev/null 2>&1 || true
+ fi
+}