blob: 80821c4e4d9f068d40342928e87d2c43ca3e5a40 [file] [log] [blame]
Max62e16d32022-10-12 16:15:25 +03001#!/bin/sh -e
Max62e16d32022-10-12 16:15:25 +03002case "$1" in
Oliver Smith5a140652024-04-26 15:08:45 +02003 configure)
4 # Create the osmocom group and user (if it doesn't exist yet)
5 if ! getent group osmocom >/dev/null; then
6 groupadd --system osmocom
7 fi
8 if ! getent passwd osmocom >/dev/null; then
9 useradd \
10 --system \
11 --gid osmocom \
12 --home-dir /var/lib/osmocom \
13 --shell /sbin/nologin \
14 --comment "Open Source Mobile Communications" \
15 osmocom
16 fi
Max62e16d32022-10-12 16:15:25 +030017
Oliver Smith5a140652024-04-26 15:08:45 +020018 # Fix permissions of previous (root-owned) install (OS#4107)
19 chown osmocom:osmocom /etc/osmocom/osmo-msc.cfg
20 chmod 0660 /etc/osmocom/osmo-msc.cfg
21 chown root:osmocom /etc/osmocom
22 chmod 2775 /etc/osmocom
23 mkdir -p /var/lib/osmocom
24 chown -R osmocom:osmocom /var/lib/osmocom
25 ;;
Max62e16d32022-10-12 16:15:25 +030026esac
27
28# dh_installdeb(1) will replace this with shell code automatically
29# generated by other debhelper scripts.
30#DEBHELPER#