-
Notifications
You must be signed in to change notification settings - Fork 166
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 #337 from pascalrobert/rpm_builds
Adding startup scripts for RedHat/CentOS/Fedora and Ubuntu
- Loading branch information
Showing
4 changed files
with
124 additions
and
0 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 |
---|---|---|
@@ -0,0 +1,44 @@ | ||
#!/bin/bash | ||
|
||
# chkconfig: - 90 20 | ||
# description: Provides JavaMonitor service | ||
|
||
# Source function library. | ||
. /etc/rc.d/init.d/functions | ||
|
||
NEXT_ROOT="/opt" | ||
export NEXT_ROOT | ||
|
||
PATH="/bin:/usr/bin:/usr/java/latest/bin" | ||
export PATH | ||
|
||
USER=appserver | ||
|
||
# See how we were called. | ||
case "$1" in | ||
start) | ||
echo -n "Starting JavaMonitor: " | ||
su $USER -c "$NEXT_ROOT/Local/Library/WebObjects/JavaApplications/JavaMonitor.woa/JavaMonitor -WOPort 56789 &" | ||
echo | ||
;; | ||
stop) | ||
echo -n "Shutting down JavaMonitor: " | ||
MONITOR_PID=`ps aux | awk '/WOPort 56789/ && !/awk/ {print $2}'` | ||
kill $MONITOR_PID | ||
echo | ||
;; | ||
restart) | ||
$0 stop | ||
$0 start | ||
;; | ||
*) | ||
echo -n "Usage: $0 {start|stop|restart}" | ||
exit 1 | ||
esac | ||
|
||
if [ $# -gt 1 ]; then | ||
shift | ||
$0 $* | ||
fi | ||
|
||
exit 0 |
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,44 @@ | ||
#!/bin/bash | ||
|
||
# chkconfig: - 90 20 | ||
# description: Provides wotaskd service | ||
|
||
# Source function library. | ||
. /etc/rc.d/init.d/functions | ||
|
||
NEXT_ROOT="/opt" | ||
export NEXT_ROOT | ||
|
||
PATH="/bin:/usr/bin:/usr/java/latest/bin" | ||
export PATH | ||
|
||
USER=appserver | ||
|
||
# See how we were called. | ||
case "$1" in | ||
start) | ||
echo -n "Starting wotaskd: " | ||
su $USER -c "$NEXT_ROOT/Local/Library/WebObjects/JavaApplications/wotaskd.woa/wotaskd -WOPort 1085 &" | ||
echo | ||
;; | ||
stop) | ||
echo -n "Shutting down wotaskd: " | ||
WOTASKD_PID=`ps aux | awk '/WOPort 1085/ && !/awk/ {print $2}'` | ||
kill $WOTASKD_PID | ||
echo | ||
;; | ||
restart) | ||
$0 stop | ||
$0 start | ||
;; | ||
*) | ||
echo -n "Usage: $0 {start|stop|restart}" | ||
exit 1 | ||
esac | ||
|
||
if [ $# -gt 1 ]; then | ||
shift | ||
$0 $* | ||
fi | ||
|
||
exit 0 |
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 @@ | ||
description "Start JavaMonitor service" | ||
author "David LeBer" | ||
|
||
start on runlevel [2345] | ||
stop on runlevel [!2345] | ||
|
||
env USER=appserver | ||
env NEXT_ROOT=/opt | ||
env WOMONITOR_LOG=/var/log/webobjects/womonitor.log | ||
|
||
respawn | ||
respawn limit 15 5 | ||
|
||
script | ||
echo "Launching JavaMonitor" | ||
su - $USER -c "$NEXT_ROOT/Local/Library/WebObjects/JavaApplications/JavaMonitor.woa/JavaMonitor -WOPort 56789 >> $WOMONITOR_LOG 2>&1" | ||
emit womonitor_running | ||
end script |
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 @@ | ||
description "Start wotaskd service" | ||
author "David LeBer" | ||
|
||
start on runlevel [2345] | ||
stop on runlevel [!2345] | ||
|
||
env USER=appserver | ||
env NEXT_ROOT=/opt | ||
env WOTASKD_LOG=/var/log/webobjects/wotaskd.log | ||
|
||
respawn | ||
respawn limit 15 5 | ||
|
||
script | ||
echo "Launching wotaskd" | ||
su - $USER -c "$NEXT_ROOT/Local/Library/WebObjects/JavaApplications/wotaskd.woa/wotaskd -WOPort 1085 >> $WOTASKD_LOG 2>&1" | ||
emit wotaskd_running | ||
end script |