diff --git a/debian/galera-4.preinst b/debian/galera-4.preinst new file mode 100644 index 000000000..c8aebb94c --- /dev/null +++ b/debian/galera-4.preinst @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +set -o errexit +set -o nounset +set -o pipefail +set -o posix + +# creating galera user +getent passwd galera >/dev/null 2>&1 || + adduser --system --no-create-home --home /nonexistent \ + --disabled-password --disabled-login galera diff --git a/garb/files/garb.service b/garb/files/garb.service index 926cf5789..73293d12f 100644 --- a/garb/files/garb.service +++ b/garb/files/garb.service @@ -11,7 +11,7 @@ WantedBy=multi-user.target Alias=garbd.service [Service] -User=nobody +User=galera ExecStart=/usr/bin/garb-systemd start # Use SIGINT because with the default SIGTERM diff --git a/garb/files/garb.sh b/garb/files/garb.sh index e35c520b8..b1e3a7466 100755 --- a/garb/files/garb.sh +++ b/garb/files/garb.sh @@ -49,7 +49,7 @@ program_start() { local rcode if [ -f /etc/redhat-release ]; then echo -n $"Starting $prog: " - daemon --user nobody $prog "$@" >/dev/null + daemon --user galera $prog "$@" >/dev/null rcode=$? if [ $rcode -eq 0 ]; then pidof $prog > $PIDFILE || rcode=$?