0

System info below.

I have created a service by creating /etc/systemd/system/unison-PaperPortDocs.service. When I run "systemctl --all list-unit-files 'unison*' I see the following list:

> systemctl --all list-unit-files 'unison*'
UNIT FILE                    STATE    PRESET 
unison-movies-nas.service    enabled  enabled
unison-msdn-download.service disabled enabled
unison-PaperPortDocs.service disabled enabled
unison-picserver-nas.service disabled enabled
unison-plexmedia.service     disabled enabled

5 unit files listed.

But when I try to enable it via 'sudo systemctl enable unison-PaperPortDocs (or with the .service extension), I get an 'unrecognized service' error.

The content is:

[Unit]
Description=Start plex-plexnas1 synchronization

[Service]
Type=simple
User=dennis
Group=dennis
ExecStart=/usr/local/bin/auto-unison PaperPortDocs-nas
Restart=on-failure
StandardOutput=file:%h/log_file

[Install]
WantedBy=multi-user.target
Alias=unison-PaperPortDocs

Permissions are 644, owned by root:root

Any idea what I am doing wrong?

> cat /etc/os-release                                                                                                                               
PRETTY_NAME="Debian GNU/Linux 12 (bookworm)"
NAME="Debian GNU/Linux"
VERSION_ID="12"
VERSION="12 (bookworm)"
VERSION_CODENAME=bookworm
ID=debian
HOME_URL="https://www.debian.org/"
SUPPORT_URL="https://www.debian.org/support"
BUG_REPORT_URL="https://bugs.debian.org/"
4
  • try removing Alias=unison-PaperPortDocs - that seems to alias to itself, which seems an odd thing to do (though my systemd knowledge is limited) Commented Jul 6 at 3:50
  • Also, Alias's must have the same suffix as the unit file, so your unit file is technically invalid Commented Jul 6 at 3:58
  • Thanks, @JaromandaX. I added the alias when it wasn't working without it. I've now removed it again. No operational change.
    – Dennis
    Commented Jul 6 at 9:49
  • I rebooted to move the server to a new location, and after restarting, this problem went away. I never trust when problems just disappear like that. :(
    – Dennis
    Commented Jul 6 at 14:02

0

You must log in to answer this question.

Browse other questions tagged .