Update README

This commit is contained in:
David Coppit
2015-06-25 23:41:19 -04:00
parent b2f4e7feba
commit 59a0e2a55c

View File

@@ -49,13 +49,10 @@ and "wheel" groups:
`-e UMAP="nobody:99:100 www:80:800" -e GMAP="users:100 wheel:800"` `-e UMAP="nobody:99:100 www:80:800" -e GMAP="users:100 wheel:800"`
For commands that create files without an explicit user or group name, you may want to set the `UGID` environment For commands that create files without an explicit user or group name, you may want to set the `USER_ID` and `GROUP_ID`
variable so that files created by the command will have the correct user and group IDs in the host. For example, if your in the config file. For example, if your command is `echo foo > /dir1/foo.txt`, then by default the file will be
command is `echo foo > /dir1/foo.txt`, then by default the file will be created as the "root" user of the container. If created as the "root" user of the container. If you want it to be created with the user ID and group ID of "nobody" in
you want it to be created as user "nobody" with its default group, you would set `UGID` to the values specified by the host, you would set these config values to the output of `id -u nobody` and `id -g nobody` in the host.
``echo `id -u nobody`:`id -g nobody` `` in the host. For instance:
`-e UGID=99:100`
Examples Examples
-------- --------
@@ -67,6 +64,9 @@ This example is to run a permissions-repairing utility whenever there's a change
MAX_WAIT_TIME=30 MAX_WAIT_TIME=30
MIN_PERIOD=30 MIN_PERIOD=30
COMMAND="/root/newperms /dir2" COMMAND="/root/newperms /dir2"
# Need to run as root to have the authority to fix the permissions
USER_ID=0
GROUP_ID=0
# This is important because chmod/chown will change files in the monitored directory # This is important because chmod/chown will change files in the monitored directory
IGNORE_EVENTS_WHILE_COMMAND_IS_RUNNING=1 IGNORE_EVENTS_WHILE_COMMAND_IS_RUNNING=1
@@ -83,7 +83,10 @@ This example tells SageTV to rescan its imported media when the media directory
MAX_WAIT_TIME=05:00 MAX_WAIT_TIME=05:00
MIN_PERIOD=10:00 MIN_PERIOD=10:00
COMMAND="wget -nv -O /dev/null --auth-no-challenge http://sage:frey@192.168.1.102:8080/sagex/api?c=RunLibraryImportScan&1=" COMMAND="wget -nv -O /dev/null --auth-no-challenge http://sage:frey@192.168.1.102:8080/sagex/api?c=RunLibraryImportScan&1="
# User and group don't really matter for the wget command. But we need to specify them in the config file.
USER_ID=0
GROUP_ID=0
IGNORE_EVENTS_WHILE_COMMAND_IS_RUNNING=0 IGNORE_EVENTS_WHILE_COMMAND_IS_RUNNING=0
We don't need to ignore events while the command is running because the wget command is a "fire and forget" asynchronous We don't need to ignore events while the command is running because the wget command is a "fire and forget" asynchronous
operation. We also don't need to use UMAP, GMAP, or UGID since this command doesn't write to any watch directory. operation. We also don't need to use UMAP or GMAP.