Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 637171 Details for
Bug 602539
quassel-core lacks an init.d script
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
init.d script for RHEL
quasselcore (text/plain), 3.13 KB, created by
Tom Fonteyne
on 2012-11-02 16:50:38 UTC
(
hide
)
Description:
init.d script for RHEL
Filename:
MIME Type:
Creator:
Tom Fonteyne
Created:
2012-11-02 16:50:38 UTC
Size:
3.13 KB
patch
obsolete
>#! /bin/bash ># ># Author: Tom Fonteyne, 2012-11-12 ># ># Tested with: ># - Quasselcore 0.8 as prebuild download from the quassel website. ># - RHEL 6.2 ># ># Copied from the Ubuntu version and modified to suit RHEL ># ># >### BEGIN INIT INFO ># Provides: quasselcore ># Required-Start: $network $local_fs ># Required-Stop: ># Should-Start: ># Should-Stop: ># Default-Start: 2 3 4 5 ># Default-Stop: 0 1 6 ># Short-Description: distributed IRC client using a central core component ># Description: This is the core component of Quassel. A modern, ># cross-platform, distributed IRC client, meaning that one ># (or multiple) client(s) can attach to and detach from this ># central core. It's much like the popular combination ># of screen and a text-based IRC client such as WeeChat. >### END INIT INFO > ># run as this user >DAEMONUSER=quasselcore > ># path to binary >DAEMON_HOME=/opt/quassel > ># actual binary >DAEMON=quasselcore > ># options to pass in, the directories need to exist and writeable by the $DAEMONUSER >DAEMON_OPTS="--configdir=/var/cache/quassel --logfile=/var/log/quassel/core.log --loglevel=Info" > ># the time in seconds we wait to check if the process really died >DIETIME=10 > ># the time in seconds we wait to check if it really started >STARTTIME=3 > > >######## nothing to configure below this line ######### > >PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin > ># sanity test >test -x $DAEMON_HOME/$DAEMON || exit 0 > >source /etc/init.d/functions > >set -e > ># if it has a pid it must be running.... >running() >{ > pid=`pidof $DAEMON` > if [ -z "$pid" ]; then > return 1 > else > return 0 > fi >} > >start_server() >{ > daemon --user $DAEMONUSER nohup $DAEMON_HOME/$DAEMON $DAEMON_OPTS & > errcode=$? > return $errcode >} > >stop_server() >{ > pkill -TERM $DAEMON > errcode=$? > return $errcode >} > >force_stop() >{ > if running ; then > kill -TERM $pid > # Is it really dead? > sleep ${DIETIME}s > if running ; then > kill -9 $pid > sleep {$DIETIME}s > if running ; then > echo "Cannot kill $DAEMON (pid=$pid)!" > exit 1 > fi > fi > fi >} > >case "$1" in > start) > if running ; then > echo "$DAEMON already running" > exit 0 > fi > if start_server ; then > sleep "${STARTTIME}"s > if running ; then > echo "$DAEMON started" > else > echo "Failed to start $DAEMON" > fi > else > echo "Failed to start $DAEMON - start_server failed" > fi > ;; > > stop) > if running ; then > stop_server > echo $? > else > echo "$DAEMON not running" > exit 0 > fi > ;; > > kill) > $0 stop > if running; then > force_stop > fi > ;; > > restart) > stop_server > # Wait some sensible amount, some server need this > [ -n "$DIETIME" ] && sleep $DIETIME > start_server > [ -n "$STARTTIME" ] && sleep $STARTTIME > running > echo $? > ;; > > status) > if running ; then > echo "$DAEMON running" > else > echo "$DAEMON not running" > exit 1 > fi > ;; > > *) > echo "Usage: $0 {start|stop|kill|restart|status}" >&2 > exit 1 > ;; >esac > >exit 0 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 602539
: 637171 |
748540
|
748630
|
748977