Merge remote-tracking branch 'ni/master'
This commit is contained in:
commit
6c719f03c1
@ -65,17 +65,30 @@ with import <stockholm/lib>;
|
|||||||
find "$ROOT_PATH" -type d -exec chmod "$DIR_MODE" {} +
|
find "$ROOT_PATH" -type d -exec chmod "$DIR_MODE" {} +
|
||||||
find "$ROOT_PATH" -type f -exec chmod "$FILE_MODE" {} +
|
find "$ROOT_PATH" -type f -exec chmod "$FILE_MODE" {} +
|
||||||
|
|
||||||
inotifywait -mrq -e CREATE --format %w%f "$ROOT_PATH" |
|
paths=/tmp/paths
|
||||||
|
rm -f "$paths"
|
||||||
|
mkfifo "$paths"
|
||||||
|
|
||||||
|
inotifywait -mrq -e CREATE --format %w%f "$ROOT_PATH" > "$paths" &
|
||||||
|
inotifywaitpid=$!
|
||||||
|
|
||||||
|
trap cleanup EXIT
|
||||||
|
cleanup() {
|
||||||
|
kill "$inotifywaitpid"
|
||||||
|
}
|
||||||
|
|
||||||
while read -r path; do
|
while read -r path; do
|
||||||
if test -d "$path"; then
|
if test -d "$path"; then
|
||||||
|
cleanup
|
||||||
exec "$0" "$@"
|
exec "$0" "$@"
|
||||||
fi
|
fi
|
||||||
chown -h "$OWNER_GROUP" "$path"
|
chown -h "$OWNER_GROUP" "$path"
|
||||||
if test -f "$path"; then
|
if test -f "$path"; then
|
||||||
chmod "$FILE_MODE" "$path"
|
chmod "$FILE_MODE" "$path"
|
||||||
fi
|
fi
|
||||||
done
|
done < "$paths"
|
||||||
'';
|
'';
|
||||||
|
PrivateTemp = true;
|
||||||
Restart = "always";
|
Restart = "always";
|
||||||
RestartSec = 10;
|
RestartSec = 10;
|
||||||
UMask = plan.umask;
|
UMask = plan.umask;
|
||||||
|
Loading…
Reference in New Issue
Block a user