Bug 641400
| Summary: | Need to daemonize the core driver and have an initscript | ||
|---|---|---|---|
| Product: | [Retired] CloudForms Cloud Engine | Reporter: | Chris Lalancette <clalance> |
| Component: | deltacloud-core | Assignee: | Michal Fojtik <mfojtik> |
| Status: | CLOSED CURRENTRELEASE | QA Contact: | wes hayutin <whayutin> |
| Severity: | medium | Docs Contact: | |
| Priority: | low | ||
| Version: | 0.3.1 | CC: | cpelland, deltacloud-maint, mfojtik, rananda |
| Target Milestone: | rc | ||
| Target Release: | --- | ||
| Hardware: | All | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | Bug Fix | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | Type: | --- | |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
|
Description
Chris Lalancette
2010-10-08 15:32:12 UTC
[root@localhost log]# cat /etc/init.d/deltacloud-core
#!/bin/bash
#
#
# deltacloud-core startup script for deltacloud-core server
#
# chkconfig: - 97 03
# description: deltacloud-core is primary server process for the \
# Deltacloud Core component.
#
[ -r /etc/sysconfig/deltacloud-core ] && . /etc/sysconfig/deltacloud-core
ENV="${ENV:-production}"
DRIVER="${DRIVER:-ec2}"
PORT="${PORT:-3002}"
LOCKFILE="${LOCKFILE:-/var/lock/subsys/deltacloud-core }"
LOGFILE="${LOGFILE:-/var/log/deltacloud-core/$DRIVER.log}"
PROG=/usr/bin/deltacloudd
. /etc/init.d/functions
start() {
echo -n "Starting deltacloud-core: "
$PROG -i $DRIVER -e $ENV -p $PORT -r 0.0.0.0 >> $LOGFILE 2>&1 &
RETVAL=$?
if [ $RETVAL -eq 0 ] && touch $LOCKFILE ; then
echo_success
echo
else
echo_failure
echo
fi
}
stop() {
echo -n "Shutting down deltacloud-core: "
RETVAL=$?
killall deltacloudd
if [ $RETVAL -eq 0 ] && rm -f $LOCKFILE ; then
echo_success
echo
else
echo_failure
echo
fi
}
case "$1" in
start)
start
;;
stop)
stop
;;
restart)
stop
start
;;
reload)
;;
force-reload)
restart
;;
status)
status $PROG
RETVAL=$?
;;
*)
echo "Usage: deltacloud-core {start|stop|restart|status}"
exit 1
;;
esac
exit $RETVAL
Guys I started packaging process for Deltacloud API for Fedora and EL: https://bugzilla.redhat.com/show_bug.cgi?id=674060 This RPM includes initscript and daemonize stuff from "support/fedora" directory. Feel free to take it for an review. release pending... release pending... closing out old bugs perm close |