This commit is contained in:
Bob Mottram 2016-10-02 12:33:56 +01:00
parent b87a325f09
commit 2e65073356
3 changed files with 13 additions and 13 deletions

View File

@ -165,15 +165,9 @@ function remove_mumble {
function get_mumble_server_password {
if [ -f /home/$MY_USERNAME/README ]; then
if grep -q "mumble server password" /home/$MY_USERNAME/README; then
if grep -q "Mumble server password" /home/$MY_USERNAME/README; then
if [ ! $MUMBLE_SERVER_PASSWORD ]; then
MUMBLE_SERVER_PASSWORD=$(cat /home/$MY_USERNAME/README | grep "mumble server password" | awk -F ':' '{print $2}' | sed 's/^ *//')
fi
else
if grep -q "Mumble server password" /home/$MY_USERNAME/README; then
if [ ! $MUMBLE_SERVER_PASSWORD ]; then
MUMBLE_SERVER_PASSWORD=$(cat /home/$MY_USERNAME/README | grep "Mumble server password" | awk -F ':' '{print $2}' | sed 's/^ *//')
fi
MUMBLE_SERVER_PASSWORD=$(cat /home/$MY_USERNAME/README | grep "Mumble server password" | awk -F ':' '{print $2}' | sed 's/^ *//')
fi
fi
fi

View File

@ -158,7 +158,7 @@ function backup_local_wiki {
function restore_local_wiki {
if [ -d /var/lib/dokuwiki ]; then
echo $"Restoring Wiki installation"
WIKI_DOMAIN_NAME=$(cat $COMPLETION_FILE | grep "Wiki domain" | awk -F ':' '{print $2}')
WIKI_DOMAIN_NAME=$(cat $COMPLETION_FILE | grep "wiki domain" | awk -F ':' '{print $2}')
temp_restore_dir=/root/tempwiki
function_check restore_directory_from_usb
restore_directory_from_usb $temp_restore_dir wiki
@ -204,7 +204,7 @@ function backup_remote_wiki {
function restore_remote_wiki {
if [ -d $SERVER_DIRECTORY/backup/wiki ]; then
WIKI_DOMAIN_NAME=$(cat $COMPLETION_FILE | grep "Wiki domain" | awk -F ':' '{print $2}')
WIKI_DOMAIN_NAME=$(cat $COMPLETION_FILE | grep "wiki domain" | awk -F ':' '{print $2}')
echo $"Restoring Wiki installation $WIKI_DOMAIN_NAME"
function_check restore_directory_from_friend
restore_directory_from_friend /root/tempwiki wiki
@ -652,7 +652,11 @@ function install_wiki {
chmod 600 /home/$MY_USERNAME/README
fi
echo "Wiki domain:$WIKI_DOMAIN_NAME" >> $COMPLETION_FILE
if ! grep -q "wiki domain" $COMPLETION_FILE; then
echo "wiki domain:$WIKI_DOMAIN_NAME" >> $COMPLETION_FILE
else
sed -i "s|wiki domain.*|wiki domain:$WIKI_DOMAIN_NAME|g" $COMPLETION_FILE
fi
}
# NOTE: deliberately no exit 0

View File

@ -72,8 +72,10 @@ function upgrade_installation_from_previous_versions {
sed -i 's|voip|mumble|g' $COMPLETION_FILE
sed -i 's|VoIP|mumble|g' $COMPLETION_FILE
sed -i 's|SIP |sip |g' $COMPLETION_FILE
sed -i 's|Blog |blog |g' $COMPLETION_FILE
sed -i 's|Hubzilla |hubzilla |g' $COMPLETION_FILE
sed -i 's|Blog|blog|g' $COMPLETION_FILE
sed -i 's|Hubzilla|hubzilla|g' $COMPLETION_FILE
sed -i 's|Gogs|gogs|g' $COMPLETION_FILE
sed -i 's|Wiki|wiki|g' $COMPLETION_FILE
if [ -f /usr/local/bin/zeronetavahi ]; then
rm /usr/local/bin/zeronetavahi