Skip to content

Commit

Permalink
filter config file empty lines in syncoid.service
Browse files Browse the repository at this point in the history
  • Loading branch information
cquest authored Oct 6, 2024
1 parent 5e2290b commit 26bb3fb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion confs/common/systemd/system/syncoid.service
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ Type=oneshot
# we also handle return result so that we get notified if there is an error.
# Some tricks: use '$$' for $ for systemd some interpolation
# + give syncoid a null input, as otherwise it consumes main input and we do loose commands
ExecStart=/bin/bash -c 'RESULT=0; grep -v "^#" /etc/sanoid/syncoid-args.conf | while read -a sync_args;do syncoid --quiet "$${sync_args[@]}" </dev/null ; RESULT=$$(($$RESULT + $$?)); done; exit $$RESULT;'
ExecStart=/bin/bash -c 'RESULT=0; egrep -v "^(#|$)" /etc/sanoid/syncoid-args.conf | while read -a sync_args;do syncoid --quiet "$${sync_args[@]}" </dev/null ; RESULT=$$(($$RESULT + $$?)); done; exit $$RESULT;'
# place a timeout for bad cases (remote machine shutdown), it's a large timeout
# note: we have to use TimeoutStartSec as it's a Type=oneshot service
TimeoutStartSec=6h
Expand Down

0 comments on commit 26bb3fb

Please sign in to comment.