diff options
author | joey <joey@0fa5a96a-9a0e-0410-b3b2-a0fd24251071> | 2006-05-05 20:48:20 +0000 |
---|---|---|
committer | joey <joey@0fa5a96a-9a0e-0410-b3b2-a0fd24251071> | 2006-05-05 20:48:20 +0000 |
commit | dd7a38147179a59bff9dffd824b265862aa1a59e (patch) | |
tree | d3ac7e6d47a83a76a90c74a89ba3009a105a8492 /ikiwiki-mass-rebuild | |
parent | 626751068b6d002183046f3e3e76eb3b9040fa6b (diff) |
* Add ikiwiki-mass-rebuild script, ripped out of the postinst.
* Add some new config items to the estseek.conf template, which are needed
by hyperestraier 1.2.3.
Diffstat (limited to 'ikiwiki-mass-rebuild')
-rwxr-xr-x | ikiwiki-mass-rebuild | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/ikiwiki-mass-rebuild b/ikiwiki-mass-rebuild new file mode 100755 index 000000000..daba2ca43 --- /dev/null +++ b/ikiwiki-mass-rebuild @@ -0,0 +1,27 @@ +#!/bin/sh +set -e + +wikilist=/etc/ikiwiki/wikilist + +processline () { + user="$1" + setup="$2" + + if [ -z "$user" ] || [ -z "$setup" ]; then + echo "parse failure in /etc/ikiwiki/wikilist, line: '$user $setup'" >&2 + exit 1 + fi + + if [ ! -f "$setup" ]; then + echo "warning: $setup specified in /etc/ikiwiki/wikilist does not exist, skipping" >&2 + else + echo "Rebuilding $setup as user $user ..." + su "$user" -c "ikiwiki -setup $setup" + fi +} + +if [ -e "$wikilist" ]; then + grep -v '^#' $wikilist | grep -v '^$' | while read line; do + processline $line + done +fi |