BK-INITSCRIPTS(1)

πŸ“¦ version 7.3.3, in alpine 3.24

πŸ’– bk initscripts πŸ’–

okay bestie, welcome to the BitKeeper User’s Manual page for bk initscripts β€” literally the sample script for starting the BitKeeper daemon. it’s giving β€œtiny but mighty init-script” energy, and we’re gonna read every line together. no cap. 🫢


🌸 NAME 🌸

bk initscripts β€” sample script for starting the BitKeeper daemon.


✨ EXAMPLES ✨

okay so here’s the whole example script, exactly as it appears β€” comments, copyright, cut-here lines, all of it. do not let the cute vibes make you retype the flags wrong, bestie. πŸ’…

#!/bin/sh
#
# bitkeeper    Start/stop the bitkeeper daemon.
#         @(#)bitkeeper.init 1.1 Copyright (c) 2000 Larry McVoy
#
# 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

🏷️ CATEGORY 🏷️

  • Overview
  • Admin

later, bestie πŸ’– β€” this page is from BitKeeper Inc, version 1E1, and the footer’s date/page-label slot says bk initscripts(none). that’s the whole manual-page moment. byeee! πŸ¦‹
πŸ“¦ where this page comes from
  • alpine 3.24: bitkeeper-doc 7.3.3-r1 Β· Apache-2.0
  • πŸ’– girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms