[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Monotone-commits-diffs] net.venge.monotone.contrib.usher: 1a897921eef6
From: |
code |
Subject: |
[Monotone-commits-diffs] net.venge.monotone.contrib.usher: 1a897921eef66341c8afc7c99eaae5c45ab2a70a |
Date: |
Tue, 18 Jan 2011 14:54:20 GMT |
revision: 1a897921eef66341c8afc7c99eaae5c45ab2a70a
date: 2011-01-18T14:54:11
author: Richard Levitte <address@hidden>
branch: net.venge.monotone.contrib.usher
changelog:
Make global.conf more configurable from usherctl
manifest:
format_version "1"
new_manifest [cfdb66a44f802b48eea7a43c24659c4890bb6cc4]
old_revision [e2a50b5003a2d6a87380c1343d01e1d32a5c3395]
patch "utils/usherctl"
from [f6f4d53eb56bdec130b464c53a5c14060c248dec]
to [c11f5241f23515ef07d36f59041387fa0a441f3b]
============================================================
--- utils/usherctl f6f4d53eb56bdec130b464c53a5c14060c248dec
+++ utils/usherctl c11f5241f23515ef07d36f59041387fa0a441f3b
@@ -478,10 +478,42 @@ case $1 in
echo >&2 "Usher is already initialised."
exit 1
fi
+
+ adminuser=admin
+ adminpass=admin
+ listenaddr=0.0.0.0:4691
+ adminaddr=127.0.0.1:12345
+ TEMP=`POSIXLY_CORRECT=yes getopt -o a:l:u:p: -n "usherctl init" -- "$@"`
+ eval set -- "$TEMP"
+ while true; do
+ case "$1" in
+ -a )
+ adminaddr="$2"; shift 2
+ ;;
+ -l )
+ listenaddr="$2"; shift 2
+ ;;
+ -u )
+ adminuser="$2"; shift 2
+ ;;
+ -p )
+ adminpass="$2"; shift 2
+ ;;
+ --)
+ shift
+ break
+ ;;
+ esac
+ done
+
mkdir "$USHER_CONFDIR" "$USHER_CONFD" "$USHER_LOGDIR"
mkdir -p "$USHER_PROJECTDIR"
sed -e '1,/^# -----BEGIN globalconf-----$/d' \
-e '/^# -----END globalconf-----$/,$d' \
+ -e "s|%adminuser%|$adminuser|g" \
+ -e "s|%adminpass%|$adminpass|g" \
+ -e "s|%listenaddr%|$listenaddr|g" \
+ -e "s|%adminaddr%|$adminaddr|g" \
-e "s|%MTN%|$MTN|g" \
-e "s|%USHER_LOGDIR%|$USHER_LOGDIR|g" \
-e 's/^# //' \
@@ -584,10 +616,10 @@ exit
#### The following is sample text used to create scripts
# -----BEGIN globalconf-----
-# userpass "admin" "admin"
+# userpass "%adminuser%" "%adminpass%"
# monotone "%MTN%"
-# listenaddr "0.0.0.0:4691"
-# adminaddr "127.0.0.1:12345"
+# listenaddr "%listenaddr%"
+# adminaddr "%adminaddr%"
# logdir "%USHER_LOGDIR%"
# -----END globalconf-----
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Monotone-commits-diffs] net.venge.monotone.contrib.usher: 1a897921eef66341c8afc7c99eaae5c45ab2a70a,
code <=