ignore systemctl failure in after_install scripts (#4596)

Otherwise installation in Docker containers fails with:
```
...
Adding new user `nimbus' (UID 101) with group `nimbus' ...
Not creating home directory `/home/nimbus'.
/var/lib/dpkg/info/nimbus-beacon-node.postinst: 39: systemctl: not found
dpkg: error processing package nimbus-beacon-node (--configure):
 installed nimbus-beacon-node package post-installation script subprocess returned error exit status 127
Errors were encountered while processing:
 nimbus-beacon-node
E: Sub-process /usr/bin/dpkg returned an error code (1)
```

Signed-off-by: Jakub Sokołowski <jakub@status.im>
This commit is contained in:
Jakub Sokołowski 2023-02-06 11:01:57 +01:00 committed by GitHub
parent f3ddea6c86
commit c81352ce4e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 2 deletions

View File

@ -19,4 +19,5 @@ fi
mkdir -p /var/lib/nimbus mkdir -p /var/lib/nimbus
chown nimbus:nimbus /var/lib/nimbus chown nimbus:nimbus /var/lib/nimbus
systemctl daemon-reload # Systems like docker containers do not have systemd.
systemctl daemon-reload || echo "notice: systemd daemon not reloaded" >&2

View File

@ -19,4 +19,5 @@ fi
mkdir -p /var/lib/nimbus mkdir -p /var/lib/nimbus
chown nimbus:nimbus /var/lib/nimbus chown nimbus:nimbus /var/lib/nimbus
systemctl daemon-reload # Systems like docker containers do not have systemd.
systemctl daemon-reload || echo "notice: systemd daemon not reloaded" >&2