Files
coder/preinstall.sh
Kyle Carberry 10dc9e3876 fix: Force keeping old files to prevent dpkg failure on update (#2399)
Updating a release if system files failed would result in failure from
the install script. This fixes it!
2022-06-15 20:04:20 -05:00

15 lines
206 B
Bash

#!/bin/sh
set -eu
USER="coder"
# Add a Coder user to run as in systemd.
if ! id -u $USER >/dev/null 2>&1; then
useradd \
--create-home \
--system \
--user-group \
--shell /bin/false \
$USER
fi