mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2025-04-02 13:45:10 -05:00
Merge pull request #703 from darmiel/patch-1
Installation Script: Check for Docker permissions on startup
This commit is contained in:
commit
30a92e25c1
@ -1,7 +1,5 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
|
||||
ask() {
|
||||
while true ; do
|
||||
if [[ -z $3 ]] ; then
|
||||
@ -64,6 +62,19 @@ if [[ -z $(which docker-compose) ]] ; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Check if user has permissions to run Docker by trying to get the status of Docker (docker status).
|
||||
# If this fails, the user probably does not have permissions for Docker.
|
||||
docker stats --no-stream 2>/dev/null 1>&2
|
||||
if [ $? -ne 0 ] ; then
|
||||
echo ""
|
||||
echo "WARN: It look like the current user does not have Docker permissions."
|
||||
echo "WARN: Use 'sudo usermod -aG docker $USER' to assign Docker permissions to the user."
|
||||
echo ""
|
||||
sleep 3
|
||||
fi
|
||||
|
||||
set -e
|
||||
|
||||
echo ""
|
||||
echo "############################################"
|
||||
echo "### Paperless-ng docker installation ###"
|
||||
|
Loading…
x
Reference in New Issue
Block a user