forked from evolix/ansible-roles
evolinux-base: backup-server-state: fix systemctl invocation
This commit is contained in:
parent
6d5aa67045
commit
8beb1e7460
|
@ -681,7 +681,7 @@ backup_systemctl() {
|
||||||
systemctl_bin=$(command -v systemctl)
|
systemctl_bin=$(command -v systemctl)
|
||||||
|
|
||||||
if [ -n "${systemctl_bin}" ]; then
|
if [ -n "${systemctl_bin}" ]; then
|
||||||
last_result=$(${systemctl_bin} systemctl --no-legend --state=failed --type=service > "${backup_dir}/systemctl-failed-services.txt")
|
last_result=$(${systemctl_bin} --no-legend --state=failed --type=service > "${backup_dir}/systemctl-failed-services.txt")
|
||||||
last_rc=$?
|
last_rc=$?
|
||||||
|
|
||||||
if [ ${last_rc} -eq 0 ]; then
|
if [ ${last_rc} -eq 0 ]; then
|
||||||
|
|
Loading…
Reference in a new issue