mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-01-21 07:55:00 +00:00
Don't use dpkg-reconfigure to modify configuration files.
It will fail if the files have been modified another way.
This commit is contained in:
parent
20318b2f25
commit
ff4fd4728c
@ -25,13 +25,7 @@ old_hostname=`debconf-show ejabberd | awk '/hostname/ { print $3 }'`
|
||||
|
||||
BACKUP=/tmp/ejabberd.dump
|
||||
|
||||
# Note: dpkg-reconfigure will fail if there have been manual changes made to the
|
||||
# configuration file for a package. Since this is the case for ejabberd,
|
||||
# manually update the hostname in the configuration file.
|
||||
echo "ejabberd ejabberd/hostname string $hostname" | debconf-set-selections
|
||||
echo "jwchat jwchat/ApacheServerName string $hostname" | debconf-set-selections
|
||||
DEBIAN_FRONTEND=noninteractive dpkg-reconfigure jwchat
|
||||
|
||||
sed -i "s/var SITENAME = \"$old_hostname\";/var SITENAME = \"$hostname\";/" /etc/jwchat/config.js
|
||||
sed -i "s/$old_hostname/$hostname/g" /etc/ejabberd/ejabberd.yml
|
||||
sed -i "s/$old_hostname/$hostname/g" $BACKUP
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user