Config directory keeps getting created under Debian

Not a huge problem but was hoping you or someone else might be able to provide some insight: I’ve configured Duplicacy Web as a service on a Debian 9 box per the posts above and in this post. All works fine but for some reason it keeps creating the config directory in / (as in /.duplicacy.service). I’ve tried including each of Environment="HOME=/root” and WorkingDirectory=/root (and then both), after which I diligently systemctl daemon-reload but to no avail - Duplicacy still keeps on creating the .duplicacy-web in /. I suppose it’s not fatal, but would really prefer to have it moved to /root. Any suggestions would be most appreciated.

Hm. I have HOME set in one more location, but IIRC it did work with the Environment= in the service definition already.

/etc/systemd/system/duplicacy.service

[Unit]
Description=Duplicacy backup

Wants=network.target
After=syslog.target network-online.target

[Service]
Type=simple
EnvironmentFile=/etc/duplicacy_web.env
Environment=“HOME=/root”
ExecStart=/home/meersjo/bin/duplicacy_web
Restart=on-failure
RestartSec=10
KillMode=process

[Install]
WantedBy=multi-user.target

/etc/duplicacy_web.env

# Where to create the .duplicacy-web folder
HOME=/root

# Encryption password; without this jobs won’t run untul you manually log on.
# SECURITY RISK! Keep this file tightly privileged.
DWE_PASSWORD=“secret”

This is on a Mint system, so should be fairly similar to a Debian setup. Running a few versions behind, though - have you checked the sytemd manpages? Perhaps something changed in more recent versions.

2 Likes

Hey thanks vegivamp. That’s helpful information. The manpages for Debian both indicate that both WorkingDirectory and Environment are still used.

Hmmm. Rather curious, I noticed the following when I check the status of the Duplicacy service:

Jul 31 17:37:44 fava2 systemd[1]: /etc/systemd/system/duplicacy.service:6: Invalid syntax, ignoring: "HOME=/root”

The debian manpage seems to indicate that this syntax is correct. The line in the duplicacy.service file is:

Environment="HOME=/root”

For the life of me I can’t see where the syntax error is in the above line. Might there be any systemd gurus out there that would be amenable to pointing out whatever mistake I’m making here? It’s not a huge deal, but it’s just driving me a bit nuts.

I don’t know if it’s because of this forum or whether you copied and pasted it, but if you look closely, the close double quotes is curved and the open double quotes is not. Sometimes, such copy and pasting from web sites use the wrong type of quotes. Hmm, lemme see…

Environment="HOME=/root"
Environment="HOME=/root”

Yup, first one is the correct style of quotes. If in doubt, re-type. :slight_smile:

2 Likes

Oh geez. I see it now. Thanks very much for pointing that out Droolio. I’m sure that’s the cause. Sucks getting old - my eyes aren’t what they used to be, and clearly I need new reading glasses. Appreciate the tip. I did in fact copy and paste (I think from the earlier entry) and actually thought I had replaced the quotes, but clearly I missed one. Lesson learned and thanks again.

1 Like

For anyone: Feel free to use the :heart: button on the posts that you found useful.

For the OP of any #support topic: you can mark the post that solved your issue by ticking the :checked: under the post. That of course may include your own post :slight_smile:

1 Like