diff options
author | Lars Wirzenius <liw@liw.fi> | 2017-10-14 14:06:31 +0300 |
---|---|---|
committer | Lars Wirzenius <liw@liw.fi> | 2017-10-14 14:57:31 +0300 |
commit | 4ece3e95eb0122bfa122fd6a1bfeb5eea2531478 (patch) | |
tree | 0806852e5d88ed50884c2eae14a9f90c60ba125e | |
parent | 8c34972274efdc291839a2609330ce5e7b54be76 (diff) | |
download | ick2-4ece3e95eb0122bfa122fd6a1bfeb5eea2531478.tar.gz |
Add: create _ick user, make log dir owned by it
-rw-r--r-- | debian/ick2.postinst | 9 | ||||
-rw-r--r-- | ick2.service | 4 |
2 files changed, 10 insertions, 3 deletions
diff --git a/debian/ick2.postinst b/debian/ick2.postinst index c8192a7..13595a9 100644 --- a/debian/ick2.postinst +++ b/debian/ick2.postinst @@ -16,7 +16,14 @@ set -eu +# Create a group and user for ick +addgroup --system --force _ick +adduser --system --disabled-login --disabled-password \ + --gecos "Ick CI" --home /var/lib/ick \ + --shell /bin/true --force \ + _ick + # Create the log directory with the right ownership and permissions. -install -d -m 0755 -o www-data -g www-data /var/log/ick2 +install -d -m 0755 -o _ick -g _ick /var/log/ick #DEBHELPER# diff --git a/ick2.service b/ick2.service index 9e2f4c1..57fd209 100644 --- a/ick2.service +++ b/ick2.service @@ -18,8 +18,8 @@ After=network.target [Service] Type=simple -User=www-data -Group=www-data +User=_ick +Group=_ick WorkingDirectory=/var/lib/ick ExecStart=/usr/bin/start_ick KillSignal=QUIT |