Projects
mass
turbina-core-mass
Log In
Username
Password
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
Expand all
Collapse all
Changes of Revision 5
View file
turbina-core-mass.spec
Changed
@@ -37,6 +37,7 @@ Source: %{tarname}-%{version}.tar.bz2 Source1: defnames.h Source2: rcmass +Source3: rcmass.redhat License: GPL Group: Productivity/Scientific/Astronomy BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot @@ -68,7 +69,13 @@ export CXXFLAGS=$RPM_OPT_FLAGS export CPPFLAGS=$RPM_OPT_FLAGS cp %{S:1} . -cp %{S:2} . +%if 0%{?fedora} || 0%{?rhel_version} || 0%{?centos_version} +# RedHat +cp %{S:3} rcmass +%else +# SUSE +cp %{S:2} rcmass +%endif make prefix=/usr %install
View file
rcmass.redhat
Added
@@ -0,0 +1,102 @@ +#!/bin/sh +# +# /etc/rc.d/init.d/turbina-core-mass +# +# chkconfig: 35 80 20 +# description: Starts and stops the turbina-core-mass (mass) daemon + +### BEGIN INIT INFO +# Provides: mass +# Required-Start: $network $named $local_fs $remote_fs +# Should-Start: $time +# Should-Stop: $null +# Required-Stop: $network $named $local_fs $remote_fs +# Default-Start: 3 5 +# Default-Stop: 0 1 2 6 +# Short-Description: Start turbina-core-mass at boot time +# Description: Enable service provided by turbina-core-mass. +### END INIT INFO + +# Source function library. +. /etc/rc.d/init.d/functions + +prog=mass +exec=/usr/bin/$prog + +# default values +MASS_USER=turbina +MASS_OPTIONS=-a + +lockfile=/var/lock/subsys/$prog + +start() { + -x $exec || exit 5 + echo -n $"Starting $prog: " + rh_status_q && echo -n "already running" && warning && echo && exit 0 + + daemon --user $MASS_USER "$exec $MASS_OPTIONS -b >/dev/null 2>&1" + retval=$? + echo + $retval -eq 0 && touch $lockfile + return $retval +} + +stop() { + echo -n $"Stopping $prog: " + retval=0 + if ! rh_status_q ; then + echo -n "already stopped" && warning + else + killproc $prog 2> /dev/null + retval=$? + fi + echo + $retval -eq 0 && rm -f $lockfile + return $retval +} + +restart() { + stop + start +} + +reload() { + restart +} + +rh_status() { + # run checks to determine if the service is running or use generic status + status $prog +} + +rh_status_q() { + rh_status >/dev/null 2>&1 +} + + +case "$1" in + start) + $1 + ;; + stop) + $1 + ;; + restart|force-reload) + restart + ;; + reload) + rh_status_q || exit 7 + $1 + ;; + status) + rh_status + ;; + condrestart|try-restart) + rh_status_q || exit 0 + restart + ;; + *) + echo $"Usage: $0 {start|stop|status|restart|condrestart|try-restart|reload|force-reload}" + exit 2 +esac +exit $?
Locations
Projects
Search
Status Monitor
Help
Open Build Service
OBS Manuals
API Documentation
OBS Portal
Reporting a Bug
Contact
Mailing List
Forums
Chat (IRC)
Twitter
Open Build Service (OBS)
is an
openSUSE project
.