-
Notifications
You must be signed in to change notification settings - Fork 574
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Benjamin Reed
committed
Jul 16, 2014
1 parent
548ce99
commit e473ebe
Showing
2 changed files
with
19 additions
and
2 deletions.
There are no files selected for viewing
13 changes: 13 additions & 0 deletions
13
opennms-base-assembly/src/main/filtered/etc/opennms.service
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
[Unit] | ||
Description=OpenNMS server | ||
After=postgresql.target | ||
|
||
[Service] | ||
Type=forking | ||
User=root | ||
PIDFile=${install.daemonlogs.dir}/opennms.pid | ||
ExecStart=${install.dir}/bin/opennms -Q start | ||
ExecStop=${install.dir}/bin/opennms stop | ||
|
||
[Install] | ||
WantedBy=multi-user.target |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
e473ebe
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should replace %{_libdir}/systemd/system/opennms.service with %{_unitdir}/opennms.service
This macro is available in CentOS 7 installs under /usr/lib/rpm/macros.d/macros.systemd
e473ebe
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We don't build on CentOS 7, so that would probably be an issue. I guess we could define %{_unitdir} if it's not set? Then it'll work as expected when building on centos7, but fall back on others...