diff --git a/contrib/package/arch/copyparty.service b/contrib/package/arch/copyparty.service index 22dac3d6..695c9bda 100644 --- a/contrib/package/arch/copyparty.service +++ b/contrib/package/arch/copyparty.service @@ -1,8 +1,8 @@ -# this will start `/usr/bin/copyparty-sfx.py` +# this will start `/usr/bin/copyparty` # and read config from `/etc/copyparty.d/*.conf` # -# you probably want to: -# change "User=cpp" and "/home/cpp/" to another user +# the %i refers to whatever you put after the copyparty@ +# so with copyparty@foo.service, %i == foo # # unless you add -q to disable logging, you may want to remove the # following line to allow buffering (slightly better performance): @@ -19,8 +19,8 @@ WorkingDirectory=/var/lib/copyparty-jail ExecReload=/bin/kill -s USR1 $MAINPID # user to run as + where the TLS certificate is (if any) -User=cpp -Environment=XDG_CONFIG_HOME=/home/cpp/.config +User=%i +Environment=XDG_CONFIG_HOME=/home/%i/.config # stop systemd-tmpfiles-clean.timer from deleting copyparty while it's running ExecStartPre=+/bin/bash -c 'mkdir -p /run/tmpfiles.d/ && echo "x /tmp/pe-copyparty*" > /run/tmpfiles.d/copyparty.conf' diff --git a/contrib/package/arch/prisonparty.service b/contrib/package/arch/prisonparty.service index cd35ba99..cbe09c7f 100644 --- a/contrib/package/arch/prisonparty.service +++ b/contrib/package/arch/prisonparty.service @@ -1,11 +1,13 @@ -# this will start `/usr/bin/copyparty-sfx.py` +# this will start `/usr/bin/copyparty` # in a chroot, preventing accidental access elsewhere, # and read copyparty config from `/etc/copyparty.d/*.conf` # # expose additional filesystem locations to copyparty -# by listing them between the last `cpp` and `--` +# by listing them between the last `%i` and `--` # -# `cpp cpp` = user/group to run copyparty as; can be IDs (1000 1000) +# `%i %i` = user/group to run copyparty as; can be IDs (1000 1000) +# the %i refers to whatever you put after the prisonparty@ +# so with prisonparty@foo.service, %i == foo # # unless you add -q to disable logging, you may want to remove the # following line to allow buffering (slightly better performance): @@ -24,7 +26,7 @@ ExecReload=/bin/kill -s USR1 $MAINPID ExecStartPre=+/bin/bash -c 'mkdir -p /run/tmpfiles.d/ && echo "x /tmp/pe-copyparty*" > /run/tmpfiles.d/copyparty.conf' # run copyparty -ExecStart=/bin/bash /usr/bin/prisonparty /var/lib/copyparty-jail cpp cpp \ +ExecStart=/bin/bash /usr/bin/prisonparty /var/lib/copyparty-jail %i %i \ /etc/copyparty.d \ -- \ /usr/bin/python3 /usr/bin/copyparty -c /etc/copyparty.d/init