Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improved service status and output management in Installation assistant #2953

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions unattended_installer/install_functions/installCommon.sh
Original file line number Diff line number Diff line change
Expand Up @@ -742,8 +742,10 @@ function installCommon_startService() {
if [[ -d /run/systemd/system ]]; then
eval "systemctl daemon-reload ${debug}"
eval "systemctl enable ${1}.service ${debug}"
eval "systemctl start ${1}.service ${debug}"
if [ "${PIPESTATUS[0]}" != 0 ]; then
service_output=$(eval "systemctl start ${1}.service 2>&1")
e_code="${PIPESTATUS[0]}"
[ -n "${service_output}" ] && eval "echo \${service_output} ${debug}"
if [ "${e_code}" != 0 ]; then
common_logger -e "${1} could not be started."
if [ -n "$(command -v journalctl)" ]; then
eval "journalctl -u ${1} >> ${logfile}"
Expand Down
6 changes: 4 additions & 2 deletions unattended_installer/passwords_tool/passwordsFunctions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -526,8 +526,10 @@ function passwords_restartService() {

if [[ -d /run/systemd/system ]]; then
eval "systemctl daemon-reload ${debug}"
eval "systemctl restart ${1}.service ${debug}"
if [ "${PIPESTATUS[0]}" != 0 ]; then
service_output=$(eval "systemctl restart ${1}.service 2>&1")
e_code="${PIPESTATUS[0]}"
[ -n "${service_output}" ] && eval "echo \${service_output} ${debug}"
if [ "${e_code}" != 0 ]; then
common_logger -e "${1} could not be started."
if [ -n "$(command -v journalctl)" ]; then
eval "journalctl -u ${1} >> ${logfile}"
Expand Down
Loading