mirror of
https://github.com/9001/copyparty.git
synced 2026-03-31 12:33:05 +10:00
add config-file preprocessor (%include)
This commit is contained in:
5
docs/copyparty.d/foo/another.conf
Normal file
5
docs/copyparty.d/foo/another.conf
Normal file
@@ -0,0 +1,5 @@
|
||||
# this file gets included twice from ../some.conf,
|
||||
# setting user permissions for a volume
|
||||
rw usr1
|
||||
r usr2
|
||||
% sibling.conf
|
||||
3
docs/copyparty.d/foo/sibling.conf
Normal file
3
docs/copyparty.d/foo/sibling.conf
Normal file
@@ -0,0 +1,3 @@
|
||||
# and this config file gets included from ./another.conf,
|
||||
# adding a final permission for each of the two volumes in ../some.conf
|
||||
m usr1 usr2
|
||||
26
docs/copyparty.d/some.conf
Normal file
26
docs/copyparty.d/some.conf
Normal file
@@ -0,0 +1,26 @@
|
||||
# lets make two volumes with the same accounts/permissions for both;
|
||||
# first declare the accounts just once:
|
||||
u usr1:passw0rd
|
||||
u usr2:letmein
|
||||
|
||||
# and listen on 127.0.0.1 only, port 2434
|
||||
-i 127.0.0.1
|
||||
-p 2434
|
||||
|
||||
# share /usr/share/games from the server filesystem
|
||||
/usr/share/games
|
||||
/vidya
|
||||
# include config file with volume permissions
|
||||
% foo/another.conf
|
||||
|
||||
# and share your ~/Music folder too
|
||||
~/Music
|
||||
/bangers
|
||||
% foo/another.conf
|
||||
|
||||
# which should result in each of the volumes getting the following permissions:
|
||||
# usr1 read/write/move
|
||||
# usr2 read/move
|
||||
#
|
||||
# because another.conf sets the read/write permissions before it
|
||||
# includes sibling.conf which adds the move permission
|
||||
13
docs/example2.conf
Normal file
13
docs/example2.conf
Normal file
@@ -0,0 +1,13 @@
|
||||
# you can include additional config like this
|
||||
# (the space after the % is important)
|
||||
#
|
||||
# since copyparty.d is a folder, it'll include all *.conf
|
||||
# files inside (not recursively) in alphabetical order
|
||||
# (not necessarily same as numerical/natural order)
|
||||
#
|
||||
# paths are relative from the location of each included file
|
||||
# unless the path is absolute, for example % /etc/copyparty.d
|
||||
#
|
||||
# max include depth is 64
|
||||
|
||||
% copyparty.d
|
||||
Reference in New Issue
Block a user