diff --git a/conf/backup_method.j2 b/conf/backup_method.j2 index ace6747..f363e41 100644 --- a/conf/backup_method.j2 +++ b/conf/backup_method.j2 @@ -13,7 +13,7 @@ RESTIC_PATH=$(yunohost app setting {{ app }} backup_path) RESTIC_PASSWORD="$(yunohost app setting {{ app }} passphrase)" RESTIC_REPOSITORY_BASE=sftp://$RESTIC_SERVER_USER@$RESTIC_SERVER:$RESTIC_SERVER_PORT/$RESTIC_PATH/ -RESTIC_COMMAND=/usr/local/bin/{{ app }} +RESTIC_COMMAND={{ install_dir }}/{{ app }} LOGFILE=/var/log/restic_backup_{{ app }}.log ERRFILE=/var/log/restic_backup_{{ app }}.err diff --git a/conf/check_method.j2 b/conf/check_method.j2 index 7640672..b9351cb 100644 --- a/conf/check_method.j2 +++ b/conf/check_method.j2 @@ -10,7 +10,7 @@ RESTIC_PATH=$(yunohost app setting {{ app }} backup_path) RESTIC_PASSWORD="$(yunohost app setting {{ app }} passphrase)" RESTIC_REPOSITORY_BASE=sftp://$RESTIC_SERVER_USER@$RESTIC_SERVER:$RESTIC_SERVER_PORT/$RESTIC_PATH/ -RESTIC_COMMAND=/usr/local/bin/{{ app }} +RESTIC_COMMAND={{ install_dir }}/{{ app }} do_check() { diff --git a/conf/systemd.service b/conf/systemd.service index 81f856c..6b5adfe 100644 --- a/conf/systemd.service +++ b/conf/systemd.service @@ -4,8 +4,8 @@ After=network.target [Service] Type=oneshot -ExecStart=/usr/local/bin/backup-with-__APP__ -ExecStartPost=/opt/yunohost/__APP__/restic_log___APP__ +ExecStart=__INSTALL_DIR__/backup-with-__APP__ +ExecStartPost=__INSTALL_DIR__/restic_log___APP__ User=__APP__ Group=__APP__ diff --git a/conf/systemd_check.service b/conf/systemd_check.service index 41652bc..754e272 100644 --- a/conf/systemd_check.service +++ b/conf/systemd_check.service @@ -5,7 +5,7 @@ After=network.target [Service] Type=oneshot ExecStart=__INSTALL_DIR__/check-__APP__ -ExecStartPost=/opt/yunohost/__APP__/restic_check_log___APP__ 0 +ExecStartPost=__INSTALL_DIR__/restic_check_log___APP__ 0 User=__APP__ Group=__APP__ diff --git a/conf/systemd_check_read_data.service b/conf/systemd_check_read_data.service index 0fb4135..64b4d2e 100644 --- a/conf/systemd_check_read_data.service +++ b/conf/systemd_check_read_data.service @@ -5,7 +5,7 @@ After=network.target [Service] Type=oneshot ExecStart=__INSTALL_DIR__/check-__APP__ "1" -ExecStartPost=/opt/yunohost/__APP__/restic_check_log___APP__ 1 +ExecStartPost=__INSTALL_DIR__/restic_check_log___APP__ 1 User=__APP__ Group=__APP__