GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — node-solid-server/docker-image/src/checks.sh at main · nodeSolidServer/node-solid-server

Expand file tree

/

checks.sh

Copy path
More file actions
More file actions

Latest commit

 

History

History
History
executable file
·
56 lines (50 loc) · 1.19 KB
/

checks.sh

Copy path

File metadata and controls

executable file
·
56 lines (50 loc) · 1.19 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
#!/bin/sh
echo "checking preconditions..."
checks_failed=0
check_failed()
{
checks_failed=$((checks_failed + 1))
}
check_if_writable()
{
# checks if the given dir is writable, if it exists
# it's ok if the dir does not exist at all, because it will be created
# during solid server startup then and have the correct permissions
dir=$1
if [ -d "${dir}" ]; then
if [ -w "${dir}" ]; then
echo "✓ ${dir} is accessible by $(whoami)"
else
echo "✗ ${dir} not writable by $(whoami)"
check_failed
fi
fi
}
check_if_file_readable()
{
# checks if the given file exists and is readable
file=$1
if [ -e "${file}" ]; then
if [ -r "${file}" ]; then
echo "✓ ${file} is accessible by $(whoami)"
else
echo "✗ ${file} not readable by $(whoami)"
check_failed
fi
else
echo "✗ ${file} does not exist"
check_failed
fi
}
check_if_writable "${SOLID_HOME}/config"
check_if_writable "${SOLID_HOME}/data"
check_if_writable "${SOLID_HOME}/.db"
check_if_file_readable "${SOLID_SSL_KEY}"
check_if_file_readable "${SOLID_SSL_CERT}"
if [ "$checks_failed" -gt 0 ]; then
echo "Finished: ERROR"
exit 1
else
echo "Finished: SUCCESS"
exit 0;
fi
You are visitor 01402520 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.