docker – Blame information for rev 40
?pathlinks?
Rev | Author | Line No. | Line |
---|---|---|---|
40 | office | 1 | #!/usr/bin/with-contenv sh |
2 | |||
3 | set -e # Exit immediately if a command exits with a non-zero status. |
||
4 | set -u # Treat unset variables as an error. |
||
5 | |||
6 | log() { |
||
7 | echo "[cont-init.d] $(basename $0): $*" |
||
8 | } |
||
9 | |||
10 | # Make sure mandatory directories exist. |
||
11 | mkdir -p /config/logs |
||
12 | |||
13 | # Take ownership of the config directory content. |
||
14 | chown -R $USER_ID:$GROUP_ID /config/* |
||
15 | |||
16 | # Take ownership of the output directory. |
||
17 | #if ! chown $USER_ID:$GROUP_ID /output; then |
||
18 | # Failed to take ownership of /output. This could happen when, |
||
19 | # for example, the folder is mapped to a network share. |
||
20 | # Continue if we have write permission, else fail. |
||
21 | # if s6-setuidgid $USER_ID:$GROUP_ID [ ! -w /output ]; then |
||
22 | # log "ERROR: Failed to take ownership and no write permission on /output." |
||
23 | # exit 1 |
||
24 | # fi |
||
25 | #fi |
||
26 | |||
27 | # vim: set ft=sh : |