<commit_before>.so ../bk-macros
.TH "bk initscripts" "\*[BKVER]" %E% "\*(BC" "\*(UM"
.SH NAME
bk initscripts \- sample script for starting the \*(BK daemon
.SH EXAMPLES
.DS 0
#!/bin/sh
#
# bitkeeper	Start/stop the bitkeeper daemon.
# 		@(#)bitkeeper.init 1.1 Copyright (c) 2000 <NAME>
#
# When starting repositories that are bound 
# to a specific port, create a file named
# /var/bitkeeper/repositories. The repositories 
# file will contain a line for each repository.
# The line consists of the directory where the
# repository resides and a set of options used 
# when started the bk daemon.
#
# For example:
#
# ---- cut here and remove the leading hash mark and spaces -----
# /home/bk/LMbench -p5000 -xcd -xpush -u99
# /home/bk/bitcluster -p6000 -xcd -xpush -u99
# /home/bk/one -p7000 -xcd -xpush -u99
# --------------------- cut here ----------------------

# Source networking configuration.
if [ -f /etc/sysconfig/network ]
then	. /etc/sysconfig/network

	# Check that networking is up.
	[ ${NETWORKING} = "no" ] && exit 0
fi
[ -x /usr/bin/bk ] || exit 0
VAR=/var/bitkeeper

case "$1" in
    start_msg)	echo "Start BitKeeper daemons"
		;;
    stop_msg)	echo "Stop BitKeeper daemons"
		;;
    restart)	$0 stop
		$0 start
		;;
    start)	cd $VAR || exit 1
		test -f repositories || {
			echo Nothing advertised: Are there any entries in the
			echo $VAR/repositories file?
			exit 0
		}
		while read dir opts
		do	(
			cd $dir || exit 1
			F=\`basename $dir\`
			bk bkd $opts -l$VAR/log.$F -P$VAR/pid.$F
			echo Started bkd $opts in $dir
			)
		done < repositories
		;;

    stop)	
		cd $VAR || exit 1
		echo Shutting down BitKeeper daemons
		for i in pid.*
		do	kill -HUP \`cat $i\`
			rm $i
		done
		;;

    status)	ps -axf | grep bkd
		;;

    *)		echo "Usage: bitkeeper {start|stop|restart|status}"
		exit 1
		;;
esac
exit 0
.DE
.\" help://Admin/init.d
.SH CATEGORY
.B Overview<commit_msg>Bug 2002-03-02-001:<commit_after>.so ../bk-macros
.TH "bk initscripts" "\*[BKVER]" %E% "\*(BC" "\*(UM"
.SH NAME
bk initscripts \- sample script for starting the \*(BK daemon
.SH EXAMPLES
.DS 0
#!/bin/sh
#
# bitkeeper	Start/stop the bitkeeper daemon.
# 		@(#)bitkeeper.init 1.1 Copyright (c) 2000 <NAME>
#
# When starting repositories that are bound 
# to a specific port, create a file named
# /var/bitkeeper/repositories. The repositories 
# file will contain a line for each repository.
# The line consists of the directory where the
# repository resides and a set of options used 
# when started the bk daemon.
#
# For example:
#
# ---- cut here and remove the leading hash mark and spaces -----
# /home/bk/LMbench -p5000 -xcd -xpush -u99
# /home/bk/bitcluster -p6000 -xcd -xpush -u99
# /home/bk/one -p7000 -xcd -xpush -u99
# --------------------- cut here ----------------------

# Source networking configuration.
if [ -f /etc/sysconfig/network ]
then	. /etc/sysconfig/network

	# Check that networking is up.
	[ ${NETWORKING} = "no" ] && exit 0
fi
[ -x /usr/bin/bk ] || exit 0
VAR=/var/bitkeeper

case "$1" in
    start_msg)	echo "Start BitKeeper daemons"
		;;
    stop_msg)	echo "Stop BitKeeper daemons"
		;;
    restart)	$0 stop
		$0 start
		;;
    start)	cd $VAR || exit 1
		test -f repositories || {
			echo Nothing advertised: Are there any entries in the
			echo $VAR/repositories file?
			exit 0
		}
		while read dir opts
		do	(
			cd $dir || exit 1
			F=\`basename $dir\`
			bk bkd $opts -l$VAR/log.$F -P$VAR/pid.$F
			echo Started bkd $opts in $dir
			)
		done < repositories
		;;

    stop)	
		cd $VAR || exit 1
		echo Shutting down BitKeeper daemons
		for i in pid.*
		do	kill -TERM \`cat $i\`
			rm $i
		done
		;;

    status)	ps -axf | grep bkd
		;;

    *)		echo "Usage: bitkeeper {start|stop|restart|status}"
		exit 1
		;;
esac
exit 0
.DE
.\" help://Admin/init.d
.SH CATEGORY
.B Overview
{'fraction_non_alphanumeric': 0.15279600945129956, 'fraction_numerical': 0.02179049619322657, 'mean_word_length': 2.4986225895316805, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1972006', 'n_tokens_mistral': 1590, 'n_tokens_neox': 1388, 'n_words': 480}