File tree Expand file tree Collapse file tree 2 files changed +15
-1
lines changed
Expand file tree Collapse file tree 2 files changed +15
-1
lines changed Original file line number Diff line number Diff line change @@ -4,8 +4,8 @@ Documentation=https://gitlab.com/Nulide/findmydeviceserver
44After =network.target
55
66[Service]
7+ User =fmd
78CapabilityBoundingSet =CAP_NET_BIND_SERVICE
8- DynamicUser =true
99ExecStart =/usr/bin/fmd serve --config /etc/findmydeviceserver/config.yml --web-dir /usr/lib/fmd-web --db-dir /var/cache/fmd-db
1010KillMode =process
1111Restart =always
Original file line number Diff line number Diff line change 1+ #! /bin/sh
2+ set -e
3+
4+ FMDUSER=fmd
5+
6+ if [ " $1 " = ' configure' ] && [ -z " $DPKG_ROOT " ] && ! getent passwd $FMDUSER > /dev/null; then
7+ # add unprivileged user for the findmydeviceserver
8+ adduser --force-badname --system --home /nonexistent \
9+ --no-create-home --quiet $FMDUSER || true
10+ fi
11+
12+ if [ $( stat -c %U /var/cache/fmd-db) != " $FMDUSER " ]; then
13+ chown -R /var/cache/fmd-db
14+ fi
You can’t perform that action at this time.
0 commit comments