Skip to content

Commit

Permalink
Item694: over enthusiastic replace
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.foswiki.org/trunk@1855 0b4bb1d4-4e5a-0410-9cc4-b2b747904278
  • Loading branch information
SvenDowideit authored and SvenDowideit committed Jan 8, 2009
1 parent aa20c42 commit 24fd134
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions core/tools/pkg/debian/postinst
Expand Up @@ -34,15 +34,15 @@ if [ "$RET" = true ]; then
#check for the existance of _any_ of the default webs
#TODO: later this will be replaced by the upgrade script
if [ ! -e /var/lib/foswiki/data/Main/WebHome.txt ]; then
if [ ! -e /var/lib/foswiki/data/Foswiki/WebHome.txt ]; then
if [ ! -e /var/lib/foswiki/data/System/WebHome.txt ]; then
if [ ! -e /var/lib/foswiki/data/Sandbox/WebHome.txt ]; then
if [ ! -e /var/lib/foswiki/data/Trash/WebHome.txt ]; then
if [ ! -e /var/lib/foswiki/data/_default/WebHome.txt ]; then
# only extract if they say so and there's no home there
# and even then, fail on overwrite so we don't stomp.
tar -zxk -C / -f /usr/share/foswiki/foswiki-data.tar.gz
# clean up the .mailnotify timestamps.
webs="Main Sandbox Foswiki Trash _default";
webs="Main Sandbox System Trash _default";
for web in $webs; do
date +%s > /var/lib/foswiki/data/$web/.mailnotify
done
Expand All @@ -68,10 +68,10 @@ rm /etc/foswiki/*~
db_get foswiki/wikiwebmaster
# do rcs checkout first?
#TODO: these settings should move to Main.SitePreferences
if [ ! -e /var/lib/foswiki/data/Foswiki/DefaultPreferences.txt ]; then
perl -pi~ -e '$U=q{'"$RET"'}; s/^(.*\*\s*Set\s*WIKIWEBMASTER\s*=\s*).*(\r?\n)$/\1$U\2/;' /var/lib/foswiki/data/Foswiki/DefaultPreferences.txt
if [ ! -e /var/lib/foswiki/data/System/DefaultPreferences.txt ]; then
perl -pi~ -e '$U=q{'"$RET"'}; s/^(.*\*\s*Set\s*WIKIWEBMASTER\s*=\s*).*(\r?\n)$/\1$U\2/;' /var/lib/foswiki/data/System/DefaultPreferences.txt
#force default to use sendmail by setting SMTPMAILHOST to blank
perl -pi~ -e 's/^(\s*\*\s*Set\s*SMTPMAILHOST\s*=\s*).*(\r\n)$/$1$2/;' /var/lib/foswiki/data/Foswiki/DefaultPreferences.txt
perl -pi~ -e 's/^(\s*\*\s*Set\s*SMTPMAILHOST\s*=\s*).*(\r\n)$/$1$2/;' /var/lib/foswiki/data/System/DefaultPreferences.txt
fi

# user + password authorized to run configure script
Expand Down

0 comments on commit 24fd134

Please sign in to comment.