Verified Commit d9e9a3b5 authored by anarcat's avatar anarcat
Browse files

package this as something that can go into pip

I'm not exactly sure we'll go that route, but it will make deployment

Note that this involves renaming the main script, which makes the
directory listing a little more confusing and redundant, but it makes
the `` stuff easier (because we don't need to rename the

The downside is that it doesn't look like a python module anymore,
which confuses some tools, but we can always add a symlink in the
source (like we do in undertime) to workaround that problem, in the

Closes: #3
parent 0b6625e7
......@@ -88,7 +88,7 @@ can start processing *all* the files at the root of that account
./ --username dangerzone-bot --location -v
./dangerzone-webdav-processor --username dangerzone-bot --location -v
Obviously, the `--username` and `--location` parameters must be
adapted to your configuration. The latter, in particular, can be found
......@@ -110,7 +110,10 @@ the systemd unit files provided along the script.
First install the script in a standard location, for example:
install /usr/local/bin/dangerzone-webdav-processor
install dangerzone-webdav-processor /usr/bin/
Note that you can also deploy the script with `pip3 install .` but in
that case you will need to change the path in the `.service` file.
Then add a role user for the project, grant it access to the Docker
......@@ -118,8 +121,11 @@ daemon:
adduser --systemd dangerzone
adduser dangerzone docker
If you want to use another username, you will need to modify the
`.service` file.
Add the configuration file to
`/etc/default/dangerzone-webdav-processor`, with the following syntax:
`/etc/default/dangerzone-webdav-processor`, in the following syntax:
......@@ -128,7 +134,7 @@ Add the configuration file to
Those are equivalent to the `--location`, `--username`, and
`--password` parameters, documented above.
Then deploy the systemd scripts:
Then deploy the systemd scripts units:
cp dangerzone-webdav-processor.{timer,service} /etc/systemd/system/
systemctl daemon-reload
url =
name = dangerzone-webdav-processor
author = Antoine Beaupré
author_email =
license = AGPLv3
description = sanitize files on a WebDAV server
long_description = file:
classifiers =
Development Status :: 5 - Production/Stable
Environment :: Console
License :: OSI Approved :: GNU Affero General Public License v3 or later (AGPLv3+)
Natural Language :: English
Operating System :: POSIX
Operating System :: POSIX :: Linux
Programming Language :: Python
Programming Language :: Python :: 3 :: Only
Programming Language :: Python :: 3
Programming Language :: Python :: 3.9
python_requires = >= 3.9
scripts = dangerzone-webdav-processor
install_requires =
setup_requires = setuptools_scm
# -*- coding: utf-8 -*-
# Copyright (C) 2021 Antoine Beaupré <>
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# GNU Affero General Public License for more details.
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <>.
from setuptools import setup
if __name__ == "__main__":
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment