-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
git-svn-id: svn://scm.deprecated.org/deprec/trunk@151 479ab18a-db23-0410-b897-fa3724b950b0
- Loading branch information
mbailey
committed
Oct 28, 2007
1 parent
38aff18
commit 429453e
Showing
2 changed files
with
43 additions
and
0 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
#!/bin/sh | ||
# | ||
# Start tracd for AGR project | ||
# | ||
# Copy to /etc/init.d and enable with: | ||
# sudo update-rc.d tracd-agr.sh defaults | ||
|
||
tracd_cmd=<%= tracd_cmd %> | ||
trac_port=<%= tracd_port %> | ||
trac_pidfile=<%= tracd_pidfile %> | ||
trac_parent_dir=<%= tracd_parent_dir %> | ||
|
||
function usage | ||
{ | ||
echo " | ||
Usage: $0 {start|stop} | ||
" | ||
exit 1 | ||
} | ||
|
||
case "$1" in | ||
start) | ||
echo "Starting tracd" | ||
for dir in `ls $trac_parent_dir`; do | ||
project="`basename $dir`" | ||
passwords="$trac_parent_dir/${dir}/conf/users.htdigest" | ||
auth_string="$auth_string --auth=${project},${passwords},${project}" | ||
done | ||
cmd="$tracd_cmd $auth_string --env-parent-dir=$trac_parent_dir \ | ||
--port=$trac_port --pidfile=$trac_pidfile --daemonize" | ||
|
||
$cmd | ||
;; | ||
|
||
stop) | ||
echo "Stopping tracd" | ||
kill `cat $trac_pidfile` >/dev/null 2>&1 | ||
rm -f $trac_pidfile | ||
;; | ||
|
||
*) | ||
usage | ||
esac |