Skip to content

Commit

Permalink
deb cleanup: mv lsc user creation in preinst (#264)
Browse files Browse the repository at this point in the history
  • Loading branch information
David Coutadeur committed Jan 22, 2024
1 parent 6b0b6b9 commit 0d37161
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
3 changes: 0 additions & 3 deletions src/install/debian/lsc.postinst
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,6 @@ lsc_logdir=/var/log/lsc
lsc_user=lsc
lsc_group=lsc

getent group ${lsc_group} > /dev/null 2>&1 || groupadd --system ${lsc_group}
getent passwd ${lsc_user} > /dev/null 2>&1 || useradd --system --gid ${lsc_group} --home-dir /etc/lsc ${lsc_user}

# Always do this
chown -R ${lsc_user}:${lsc_group} ${lsc_logdir}

Expand Down
9 changes: 9 additions & 0 deletions src/install/debian/lsc.preinst
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#!/bin/bash

lsc_logdir=/var/log/lsc
lsc_user=lsc
lsc_group=lsc

getent group ${lsc_group} > /dev/null 2>&1 || groupadd --system ${lsc_group}
getent passwd ${lsc_user} > /dev/null 2>&1 || useradd --system --gid ${lsc_group} --home-dir /etc/lsc ${lsc_user}

0 comments on commit 0d37161

Please sign in to comment.