Tidying
This commit is contained in:
parent
b87a325f09
commit
2e65073356
|
@ -165,18 +165,12 @@ function remove_mumble {
|
||||||
|
|
||||||
function get_mumble_server_password {
|
function get_mumble_server_password {
|
||||||
if [ -f /home/$MY_USERNAME/README ]; then
|
if [ -f /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 grep -q "Mumble server password" /home/$MY_USERNAME/README; then
|
||||||
if [ ! $MUMBLE_SERVER_PASSWORD ]; then
|
if [ ! $MUMBLE_SERVER_PASSWORD ]; then
|
||||||
MUMBLE_SERVER_PASSWORD=$(cat /home/$MY_USERNAME/README | grep "Mumble server password" | awk -F ':' '{print $2}' | sed 's/^ *//')
|
MUMBLE_SERVER_PASSWORD=$(cat /home/$MY_USERNAME/README | grep "Mumble server password" | awk -F ':' '{print $2}' | sed 's/^ *//')
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
fi
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function configure_firewall_for_mumble {
|
function configure_firewall_for_mumble {
|
||||||
|
|
|
@ -158,7 +158,7 @@ function backup_local_wiki {
|
||||||
function restore_local_wiki {
|
function restore_local_wiki {
|
||||||
if [ -d /var/lib/dokuwiki ]; then
|
if [ -d /var/lib/dokuwiki ]; then
|
||||||
echo $"Restoring Wiki installation"
|
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
|
temp_restore_dir=/root/tempwiki
|
||||||
function_check restore_directory_from_usb
|
function_check restore_directory_from_usb
|
||||||
restore_directory_from_usb $temp_restore_dir wiki
|
restore_directory_from_usb $temp_restore_dir wiki
|
||||||
|
@ -204,7 +204,7 @@ function backup_remote_wiki {
|
||||||
|
|
||||||
function restore_remote_wiki {
|
function restore_remote_wiki {
|
||||||
if [ -d $SERVER_DIRECTORY/backup/wiki ]; then
|
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"
|
echo $"Restoring Wiki installation $WIKI_DOMAIN_NAME"
|
||||||
function_check restore_directory_from_friend
|
function_check restore_directory_from_friend
|
||||||
restore_directory_from_friend /root/tempwiki wiki
|
restore_directory_from_friend /root/tempwiki wiki
|
||||||
|
@ -652,7 +652,11 @@ function install_wiki {
|
||||||
chmod 600 /home/$MY_USERNAME/README
|
chmod 600 /home/$MY_USERNAME/README
|
||||||
fi
|
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
|
# NOTE: deliberately no exit 0
|
||||||
|
|
|
@ -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|VoIP|mumble|g' $COMPLETION_FILE
|
sed -i 's|VoIP|mumble|g' $COMPLETION_FILE
|
||||||
sed -i 's|SIP |sip |g' $COMPLETION_FILE
|
sed -i 's|SIP |sip |g' $COMPLETION_FILE
|
||||||
sed -i 's|Blog |blog |g' $COMPLETION_FILE
|
sed -i 's|Blog|blog|g' $COMPLETION_FILE
|
||||||
sed -i 's|Hubzilla |hubzilla |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
|
if [ -f /usr/local/bin/zeronetavahi ]; then
|
||||||
rm /usr/local/bin/zeronetavahi
|
rm /usr/local/bin/zeronetavahi
|
||||||
|
|
Loading…
Reference in New Issue