From 41553b2d74f1b9058719674b9283f1939f99de21 Mon Sep 17 00:00:00 2001 From: fram3d Date: Thu, 24 Aug 2023 01:58:15 +0200 Subject: [PATCH] autoenable service in .deb installation --- build-deb/luser/DEBIAN/control | 2 +- build-deb/luser/DEBIAN/postinst | 3 +++ build-deb/luser/DEBIAN/prerm | 3 +++ 3 files changed, 7 insertions(+), 1 deletion(-) create mode 100755 build-deb/luser/DEBIAN/postinst create mode 100755 build-deb/luser/DEBIAN/prerm diff --git a/build-deb/luser/DEBIAN/control b/build-deb/luser/DEBIAN/control index 2605ed6..ed17d02 100644 --- a/build-deb/luser/DEBIAN/control +++ b/build-deb/luser/DEBIAN/control @@ -4,7 +4,7 @@ Priority: optional Architecture: all Essential: no Installed-Size: 2000 -Depends: python3-flask, python3-ldap3 +Depends: python3-flask, python3-ldap3, gunicorn Homepage: https://gitea.dmz.rs/fram3d/luser Maintainer: fram3d Description: Web app that allows users to add,remove and change passwords in LDAP system diff --git a/build-deb/luser/DEBIAN/postinst b/build-deb/luser/DEBIAN/postinst new file mode 100755 index 0000000..755f65a --- /dev/null +++ b/build-deb/luser/DEBIAN/postinst @@ -0,0 +1,3 @@ +#!/bin/sh +/usr/bin/systemctl enable luser.service +/sbin/service luser start diff --git a/build-deb/luser/DEBIAN/prerm b/build-deb/luser/DEBIAN/prerm new file mode 100755 index 0000000..3c44ee6 --- /dev/null +++ b/build-deb/luser/DEBIAN/prerm @@ -0,0 +1,3 @@ +#!/bin/sh +/sbin/service luser stop +/usr/bin/systemdctl disable luser.service