-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #18 from ddndrk/version-1.0+systemd
Version 1.0+systemd
- Loading branch information
Showing
9 changed files
with
34 additions
and
201 deletions.
There are no files selected for viewing
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 |
---|---|---|
@@ -1,12 +1,5 @@ | ||
#!/bin/sh -e | ||
# Fakeroot and lein don't get along, so we set ownership after the fact. | ||
chown -R root:root /usr/lib/disthene-reader | ||
chown root:root /usr/bin/disthene-reader | ||
chown disthene-reader:disthene-reader /var/log/disthene-reader | ||
chown -R disthene-reader:disthene-reader /etc/disthene-reader | ||
chown root:root /etc/init.d/disthene-reader | ||
|
||
if [ -x "/etc/init.d/disthene-reader" ]; then | ||
update-rc.d disthene-reader start 50 2 3 4 5 . stop 50 0 1 6 . >/dev/null | ||
invoke-rc.d disthene-reader start || exit $? | ||
fi |
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 |
---|---|---|
@@ -1,4 +1 @@ | ||
#!/bin/sh -e | ||
if [ "$1" = "purge" ] ; then | ||
update-rc.d disthene-reader remove >/dev/null | ||
fi |
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 |
---|---|---|
@@ -1,4 +1,2 @@ | ||
#!/bin/sh -e | ||
if [ -x "/etc/init.d/disthene-reader" ]; then | ||
invoke-rc.d disthene-reader stop || exit $? | ||
fi | ||
systemctl stop disthene-reader || exit $? |
This file was deleted.
Oops, something went wrong.
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,18 @@ | ||
[Unit] | ||
Description=Disthene reader server | ||
StartLimitIntervalSec=180 | ||
StartLimitBurst=3 | ||
|
||
[Service] | ||
Type=simple | ||
User=disthene-reader | ||
LimitNOFILE=1000000 | ||
LimitMEMLOCK=infinity | ||
EnvironmentFile=/etc/default/disthene-reader | ||
ExecStart=/usr/bin/java $JAVA_OPTS -jar /usr/lib/disthene-reader/disthene-reader.jar $OPTS | ||
ExecReload=/bin/kill -HUP $MAINPID | ||
Restart=on-failure | ||
RestartSec=5s | ||
|
||
[Install] | ||
WantedBy=multi-user.target |
This file was deleted.
Oops, something went wrong.
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
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
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 |
---|---|---|
@@ -1,12 +1,16 @@ | ||
# JAVA_OPTS | ||
JAVA_OPTS="-server" | ||
JAVA_OPTS="-Xms<%= @java_xms %> -Xmx<%= @java_xmx %>" | ||
JAVA_OPTS="$JAVA_OPTS <%= @java_extra_options %>" | ||
JAVA_OPTS="-Xms<%= @java_xms %> -Xmx<%= @java_xmx %> <%= @java_extra_options %>" | ||
|
||
# DISTHENE_OPTS | ||
OPTS="" | ||
|
||
# Alternative path to config file | ||
# default is /etc/disthene-reader/disthene-reader.yaml | ||
# DISTHENE_CONFIG_FILE= | ||
# OPTS="-c /etc/disthene-reader/disthene-reader.yaml" | ||
|
||
# Alternative path to log4j config file | ||
# default is /etc/disthene-reader/disthene-reader-log4j.xml | ||
# DISTHENE_LOG_CONFIG_FILE= | ||
# OPTS="-l /etc/disthene-reader/disthene-reader-log4j.xml" | ||
# | ||
# Alternative path to config and log4j config files together | ||
# OPTS="-c /etc/disthene-reader/disthene-reader.yaml -l /etc/disthene-reader/disthene-reader-log4j.xml" |