initscript for sBNC
Bug #716987 reported by
felix-kunsmann
on 2010-08-01
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
| shroudBNC |
Wishlist
|
Gunnar Beutner |
Bug Description
Create an initscript for sBNC which can be used to automatically start sBNC via /etc/init.d or something.
Gunnar Beutner (gunnarbeutner) wrote : | #2 |
Starting sbnc using crontab might be much easier, especially since using an init script would require root privileges (i.e. in order to add / update the usernames):
@reboot /path/for/sbnc --config /path/for/configdir &>/dev/null
1.3 locks its config dir, so it might even be possible to 'check' whether a particular instance is running:
*/10 * * * * /path/for/sbnc --config /path/for/configdir &>/dev/null
This would check (and possibly restart sbnc) every 10 minutes.
Need to figure out which approach is better (crontab/
Christoph Wiese (elrico-deactivatedaccount)
on 2011-02-11
tags: | added: compilation-and-installation |
Changed in shroudbnc: | |
importance: | Medium → Wishlist |
To post a comment you must log in.
#!/bin/bash
# Initscript for sBNC
# Author: Axel 'shenziro' Hartwig
### Config ###
# Change UID/GID after starting to <uid|username> [:<gid: groupname> ] "ircstuff: ircstuff"
CHANGEUIDGID=
# Path to the program (not the name of the executeable; no trailing slash) "/home/ opt/sbnc1. 3"
PROGPATH=
# Name of the executeable in $PROGPATH
PROGEXEC="sbnc"
# Program parameters
PROGPARAMS=""
# Name of the program (only used to display it during start/stop in this script)
PROGNAME="sBNC"
### Script ###
function do_start {
echo -n "Starting $PROGNAME: "
if [ $returnval == 0 ]; then
else
fi
}
function do_stop {
echo -n "Stopping $PROGNAME: "
if [ $returnval == 0 ]; then
else
fi
}
case $1 in
do_start
do_stop
do_stop
do_start
echo "Usage: $0 {start| stop|restart} " >&2
exit 1
start)
;;
stop)
;;
restart)
;;
*)
;;
esac