diff options
Diffstat (limited to 'newsboat/entrypoint.sh')
-rwxr-xr-x | newsboat/entrypoint.sh | 31 |
1 files changed, 0 insertions, 31 deletions
diff --git a/newsboat/entrypoint.sh b/newsboat/entrypoint.sh deleted file mode 100755 index 0e308cf..0000000 --- a/newsboat/entrypoint.sh +++ /dev/null | |||
@@ -1,31 +0,0 @@ | |||
1 | #!/bin/sh | ||
2 | |||
3 | HOME_DIR="/home/newsboat/.newsboat" | ||
4 | URLS_FILE="${HOME_DIR}/urls" | ||
5 | |||
6 | # No point starting if they don't have config, also we don't | ||
7 | # want to store the actual user data in the container so force | ||
8 | # a mount. | ||
9 | if [ ! -d $HOME_DIR ]; then | ||
10 | echo "Mount your newsboat config to /home/newsboat/.newsboat" | ||
11 | exit 1 | ||
12 | fi | ||
13 | |||
14 | # Also force a urls file because this newsboat will just fail | ||
15 | # anyhow without it. | ||
16 | if [ ! -f $URLS_FILE ]; then | ||
17 | echo "Create a urls file in your newsboat config first" | ||
18 | exit 1 | ||
19 | fi | ||
20 | |||
21 | # Allow users to specify the UID/GID in the environment but | ||
22 | # default these to the existing owner of the files in their | ||
23 | # mounted config, which should be sane. | ||
24 | UID=${UID:-$(stat -c "%u" $URLS_FILE)} | ||
25 | GID=${GID:-$(stat -c "%u" $URLS_FILE)} | ||
26 | |||
27 | # Create the user and group | ||
28 | addgroup -g ${GID} -S newsboat | ||
29 | adduser -u ${UID} -S -h /home/newsboat -H -D -G newsboat newsboat | ||
30 | |||
31 | /sbin/su-exec newsboat "$@" | ||