Skip to content

Commit

Permalink
templates for trac
Browse files Browse the repository at this point in the history
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
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 0 deletions.
Binary file added lib/deprec/templates/trac/trac_deprec.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
43 changes: 43 additions & 0 deletions lib/deprec/templates/trac/tracd-init.erb
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

0 comments on commit 429453e

Please sign in to comment.