Remove 'su - {{ borgbackup_user }} -c' to execute the borgmatic by the right user

This commit is contained in:
Frank Dornheim 2023-03-11 23:33:53 +01:00
parent 35e7481da2
commit 2eb08207ac
3 changed files with 6 additions and 3 deletions

View File

@ -11,7 +11,8 @@ ConditionACPower=true
[Service]
Type=oneshot
ExecStart=su - {{ borgbackup_user }} -c '/usr/local/bin/borgmatic -C -p -c /etc/borgmatic/{{ borgmatic_config_name }}'
User={{ borgbackup_user }}
ExecStart=/usr/local/bin/borgmatic -C -p -c /etc/borgmatic/{{ borgmatic_config_name }}
# Source: https://projects.torsion.org/borgmatic-collective/borgmatic/raw/branch/master/sample/systemd/borgmatic.service
# Security settings for systemd running as root, optional but recommended to improve security. You

View File

@ -11,7 +11,8 @@ ConditionACPower=true
[Service]
Type=oneshot
ExecStart=su - {{ borgbackup_user }} -c '/usr/local/bin/borgmatic -k -c /etc/borgmatic/{{ borgmatic_config_name }}'
User={{ borgbackup_user }}
ExecStart=/usr/local/bin/borgmatic -k -c /etc/borgmatic/{{ borgmatic_config_name }}
# Source: https://projects.torsion.org/borgmatic-collective/borgmatic/raw/branch/master/sample/systemd/borgmatic.service
# Security settings for systemd running as root, optional but recommended to improve security. You

View File

@ -11,7 +11,8 @@ ConditionACPower=true
[Service]
Type=oneshot
ExecStart=su - {{ borgbackup_user }} -c '/usr/local/bin/borgmatic -c /etc/borgmatic/{{ borgmatic_config_name }}'
User={{ borgbackup_user }}
ExecStart=/usr/local/bin/borgmatic -c /etc/borgmatic/{{ borgmatic_config_name }}
# Source: https://projects.torsion.org/borgmatic-collective/borgmatic/raw/branch/master/sample/systemd/borgmatic.service
# Security settings for systemd running as root, optional but recommended to improve security. You