Skip to content

Commit

Permalink
Issue/11: Drop support for legacy service startup
Browse files Browse the repository at this point in the history
Replace `service` with native `systemctl` command and drop support for older distributions without Systemd. Additional
remove blocking on wait to start OpenNMS services with setting the START_TIMEOUT to 0 by creating a opennms.conf.
  • Loading branch information
indigo423 committed May 12, 2018
1 parent 094a80c commit 13c95b9
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
5 changes: 4 additions & 1 deletion bootstrap-debian.sh
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,10 @@ initializeOnmsDb() {
restartOnms() {
printf 'START_TIMEOUT=0' > "${OPENNMS_HOME}/etc/opennms.conf"
echo -n "Starting OpenNMS ... "
service opennms restart 1>/dev/null 2>>${ERROR_LOG}
systemctl start opennms 1>/dev/null 2>>${ERROR_LOG}
checkError ${?}
echo -n "OpenNMS systemd enable ... "
systemctl enable opennms 1>/dev/null 2>>${ERROR_LOG}
checkError ${?}
}

Expand Down
1 change: 1 addition & 0 deletions bootstrap-yum.sh
Original file line number Diff line number Diff line change
Expand Up @@ -250,6 +250,7 @@ initializeOnmsDb() {
}

restartOnms() {
printf 'START_TIMEOUT=0' > "${OPENNMS_HOME}/etc/opennms.conf"
echo -n "Starting OpenNMS ... "
systemctl start opennms 1>/dev/null 2>>${ERROR_LOG}
checkError ${?}
Expand Down

0 comments on commit 13c95b9

Please sign in to comment.