mirror of
https://codeberg.org/privacy1st/nix-git
synced 2024-11-21 22:03:19 +01:00
improved systemd service log
This commit is contained in:
parent
b7cb54dc93
commit
c6f4deb733
@ -35,8 +35,20 @@
|
|||||||
];
|
];
|
||||||
script = ''
|
script = ''
|
||||||
set -eu -o pipefail
|
set -eu -o pipefail
|
||||||
/jc-config/docker-compose pull
|
|
||||||
/jc-config/docker-compose up -d --wait
|
# We use
|
||||||
|
# 2> >(sed 's/^/<3> /' >&2)
|
||||||
|
# to prefix each line of stderr with
|
||||||
|
# "<3> "
|
||||||
|
# Source: https://superuser.com/a/882025/919675
|
||||||
|
#
|
||||||
|
# With this prefix, the stderr output is treated as error messages by systemd.
|
||||||
|
# See https://www.freedesktop.org/software/systemd/man/latest/sd-daemon.html
|
||||||
|
# They can be viewed with
|
||||||
|
# journalctl -b -u Jinja-Compose.service
|
||||||
|
|
||||||
|
/jc-config/docker-compose pull 2> >(sed 's/^/<3> /' >&2)
|
||||||
|
/jc-config/docker-compose up -d --wait 2> >(sed 's/^/<3> /' >&2)
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user