Debian Codegraph @

debian/patches/0008-remove-dirs-on-purge.patch

raw symbols SCIP
1 Fromscip-debian debian caddy 2.11.4-1 caddy/patches/`0008-remove-dirs-on-purge.patch`#From.: Peymaneh <[email protected]scip-debian . . . identity/`[email protected]`.>
2 Datescip-debian debian caddy 2.11.4-1 caddy/patches/`0008-remove-dirs-on-purge.patch`#Date.: Fri, 23 Dec 2022 21:20:44 +0100
3 Subjectscip-debian debian caddy 2.11.4-1 caddy/patches/`0008-remove-dirs-on-purge.patch`#Subject.: postinst/postrm: do not leave directories on purge
4
5 ---
6 dist/scripts/postinstall.sh | 7 +++++++
7 dist/scripts/postremove.sh | 3 ++-
8 2 files changed, 9 insertions(+), 1 deletion(-)
9
10 --- a/dist/scripts/postinstall.shscip-debian debian caddy 2.11.4-1 caddy/upstream/`dist/scripts/postinstall.sh`:
11 +++ b/dist/scripts/postinstall.shscip-debian debian caddy 2.11.4-1 caddy/upstream/`dist/scripts/postinstall.sh`:
12 @@ -19,6 +19,13 @@
13 usermod -aG www-data caddy
14 fi
15
16 + # handle cases where package was installed and then purged;
17 + # user and group will still exist but with no home dir
18 + if [ ! -d /var/lib/caddy ]; then
19 + mkdir -p /var/lib/caddy
20 + chown caddy:caddy /var/lib/caddy
21 + fi
22 +
23 # Add log directory with correct permissions
24 if [ ! -d /var/log/caddy ]; then
25 mkdir -p /var/log/caddy