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

(SIMP-4477) Add fully qualified paths to startup scripts #52

Merged
merged 1 commit into from
Mar 9, 2018

Conversation

lnemsick-simp
Copy link
Contributor

  • Fixed bug in which the stunnel systemd pre-exec script failed to
    execute completely, because one command did not have a fully
    qualified path.
  • Reworked stunnel systemd pre-exec scripts to only emit error
    messages when errors have occurred.
  • Tweaked workaround for munged /etc/resolv.conf problem in
    acceptance test.

SIMP-4477 #close

- Fixed bug in which the stunnel systemd pre-exec script failed to
  execute completely, because one command did not have a fully
  qualified path.
- Reworked stunnel systemd pre-exec scripts to only emit error
  messages when errors have occurred.
- Tweaked workaround for munged /etc/resolv.conf problem in
  acceptance test.

SIMP-4477 #close
@lnemsick-simp
Copy link
Contributor Author

@@ -7,7 +7,8 @@ Wants=network-online.target

[Service]
Type=simple
ExecStartPre=-/usr/bin/pkill -f "stunnel /etc/stunnel/stunnel.conf" -F /var/stunnel/var/opt/run/stunnel.pid ; rm /var/stunnel/var/opt/run/stunnel.pid
ExecStartPre=/bin/bash -c 'if test -f /var/stunnel/var/opt/run/stunnel.pid; then /usr/bin/pkill -f "stunnel /etc/stunnel/stunnel.conf" -F /var/stunnel/var/opt/run/stunnel.pid; fi'

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The dash right after the equals here means that this step can have any exit code, if that makes this logic easier

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I opted to not use the dash to allow fail option, because systemctl status stunnel always prints out error messages about not being able to pkill or remove the lock file.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, neat.

@op-ct op-ct merged commit f99153d into simp:master Mar 9, 2018
@lnemsick-simp lnemsick-simp deleted the SIMP-4477 branch May 21, 2018 15:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants