lower case

This commit is contained in:
Bob Mottram 2016-10-02 12:19:31 +01:00
parent 2f2b3049cb
commit fd31df500e
2 changed files with 23 additions and 23 deletions

View File

@ -49,7 +49,7 @@ function hubzilla_renew_cert {
1) return;; 1) return;;
255) return;; 255) return;;
esac esac
HUBZILLA_DOMAIN_NAME=$(cat $COMPLETION_FILE | grep "Hubzilla domain" | awk -F ':' '{print $2}') HUBZILLA_DOMAIN_NAME=$(cat $COMPLETION_FILE | grep "hubzilla domain" | awk -F ':' '{print $2}')
if [ ! -d /var/www/$HUBZILLA_DOMAIN_NAME/htdocs ]; then if [ ! -d /var/www/$HUBZILLA_DOMAIN_NAME/htdocs ]; then
dialog --title $"Renew SSL certificate" \ dialog --title $"Renew SSL certificate" \
--msgbox $"Hubzilla install directory not found" 6 40 --msgbox $"Hubzilla install directory not found" 6 40
@ -65,12 +65,12 @@ function hubzilla_renew_cert {
} }
function hubzilla_channel_directory_server { function hubzilla_channel_directory_server {
if ! grep -q "Hubzilla domain" $COMPLETION_FILE; then if ! grep -q "hubzilla domain" $COMPLETION_FILE; then
dialog --title $"Hubzilla channel directory server" \ dialog --title $"Hubzilla channel directory server" \
--msgbox $"Hubzilla is not installed on this system" 6 40 --msgbox $"Hubzilla is not installed on this system" 6 40
return return
fi fi
HUBZILLA_DOMAIN_NAME=$(cat $COMPLETION_FILE | grep "Hubzilla domain" | awk -F ':' '{print $2}') HUBZILLA_DOMAIN_NAME=$(cat $COMPLETION_FILE | grep "hubzilla domain" | awk -F ':' '{print $2}')
if [ ! -d /var/www/$HUBZILLA_DOMAIN_NAME/htdocs ]; then if [ ! -d /var/www/$HUBZILLA_DOMAIN_NAME/htdocs ]; then
dialog --title $"Hubzilla channel directory server" \ dialog --title $"Hubzilla channel directory server" \
--msgbox $"Hubzilla install directory not found" 6 40 --msgbox $"Hubzilla install directory not found" 6 40
@ -257,8 +257,8 @@ function upgrade_hubzilla {
HUBZILLA_PATH=/var/www/$HUBZILLA_DOMAIN_NAME/htdocs HUBZILLA_PATH=/var/www/$HUBZILLA_DOMAIN_NAME/htdocs
function_check set_repo_commit function_check set_repo_commit
set_repo_commit $HUBZILLA_PATH "Hubzilla commit" "$HUBZILLA_COMMIT" $HUBZILLA_REPO set_repo_commit $HUBZILLA_PATH "hubzilla commit" "$HUBZILLA_COMMIT" $HUBZILLA_REPO
set_repo_commit $HUBZILLA_PATH/addon "Hubzilla addons commit" "$HUBZILLA_ADDONS_COMMIT" $HUBZILLA_ADDONS_REPO set_repo_commit $HUBZILLA_PATH/addon "hubzilla addons commit" "$HUBZILLA_ADDONS_COMMIT" $HUBZILLA_ADDONS_REPO
if [ -d $HUBZILLA_PATH/redmatrix-themes1 ]; then if [ -d $HUBZILLA_PATH/redmatrix-themes1 ]; then
cd $HUBZILLA_PATH/redmatrix-themes1 cd $HUBZILLA_PATH/redmatrix-themes1
git stash git stash
@ -269,8 +269,8 @@ function upgrade_hubzilla {
} }
function backup_local_hubzilla { function backup_local_hubzilla {
if grep -q "Hubzilla domain" $COMPLETION_FILE; then if grep -q "hubzilla domain" $COMPLETION_FILE; then
HUBZILLA_DOMAIN_NAME=$(cat $COMPLETION_FILE | grep "Hubzilla domain" | awk -F ':' '{print $2}') HUBZILLA_DOMAIN_NAME=$(cat $COMPLETION_FILE | grep "hubzilla domain" | awk -F ':' '{print $2}')
hubzilla_path=/var/www/${HUBZILLA_DOMAIN_NAME}/htdocs hubzilla_path=/var/www/${HUBZILLA_DOMAIN_NAME}/htdocs
if [ -d $hubzilla_path ]; then if [ -d $hubzilla_path ]; then
echo $"Backing up Hubzilla" echo $"Backing up Hubzilla"
@ -285,10 +285,10 @@ function backup_local_hubzilla {
} }
function restore_local_hubzilla { function restore_local_hubzilla {
if ! grep -q "Hubzilla domain" $COMPLETION_FILE; then if ! grep -q "hubzilla domain" $COMPLETION_FILE; then
return return
fi fi
HUBZILLA_DOMAIN_NAME=$(cat $COMPLETION_FILE | grep "Hubzilla domain" | awk -F ':' '{print $2}') HUBZILLA_DOMAIN_NAME=$(cat $COMPLETION_FILE | grep "hubzilla domain" | awk -F ':' '{print $2}')
if [ $HUBZILLA_DOMAIN_NAME ]; then if [ $HUBZILLA_DOMAIN_NAME ]; then
echo $"Restoring Hubzilla" echo $"Restoring Hubzilla"
temp_restore_dir=/root/temphubzilla temp_restore_dir=/root/temphubzilla
@ -313,8 +313,8 @@ function restore_local_hubzilla {
} }
function backup_remote_hubzilla { function backup_remote_hubzilla {
if grep -q "Hubzilla domain" $COMPLETION_FILE; then if grep -q "hubzilla domain" $COMPLETION_FILE; then
HUBZILLA_DOMAIN_NAME=$(cat $COMPLETION_FILE | grep "Hubzilla domain" | awk -F ':' '{print $2}') HUBZILLA_DOMAIN_NAME=$(cat $COMPLETION_FILE | grep "hubzilla domain" | awk -F ':' '{print $2}')
temp_backup_dir=/var/www/${HUBZILLA_DOMAIN_NAME}/htdocs temp_backup_dir=/var/www/${HUBZILLA_DOMAIN_NAME}/htdocs
if [ -d $temp_backup_dir ]; then if [ -d $temp_backup_dir ]; then
suspend_site ${HUBZILLA_DOMAIN_NAME} suspend_site ${HUBZILLA_DOMAIN_NAME}
@ -331,9 +331,9 @@ function backup_remote_hubzilla {
} }
function restore_remote_hubzilla { function restore_remote_hubzilla {
if grep -q "Hubzilla domain" $COMPLETION_FILE; then if grep -q "hubzilla domain" $COMPLETION_FILE; then
echo $"Restoring Hubzilla" echo $"Restoring Hubzilla"
HUBZILLA_DOMAIN_NAME=$(cat $COMPLETION_FILE | grep "Hubzilla domain" | awk -F ':' '{print $2}') HUBZILLA_DOMAIN_NAME=$(cat $COMPLETION_FILE | grep "hubzilla domain" | awk -F ':' '{print $2}')
function_check restore_database_from_friend function_check restore_database_from_friend
function_check hubzilla_create_database function_check hubzilla_create_database
@ -359,7 +359,7 @@ function remove_hubzilla {
return return
fi fi
echo $'Removing Hubzilla' echo $'Removing Hubzilla'
HUBZILLA_DOMAIN_NAME=$(cat $COMPLETION_FILE | grep "Hubzilla domain" | awk -F ':' '{print $2}') HUBZILLA_DOMAIN_NAME=$(cat $COMPLETION_FILE | grep "hubzilla domain" | awk -F ':' '{print $2}')
nginx_dissite $HUBZILLA_DOMAIN_NAME nginx_dissite $HUBZILLA_DOMAIN_NAME
if [ -d /var/www/$HUBZILLA_DOMAIN_NAME ]; then if [ -d /var/www/$HUBZILLA_DOMAIN_NAME ]; then
rm -rf /var/www/$HUBZILLA_DOMAIN_NAME rm -rf /var/www/$HUBZILLA_DOMAIN_NAME
@ -371,8 +371,7 @@ function remove_hubzilla {
drop_database hubzilla drop_database hubzilla
function_check remove_onion_service function_check remove_onion_service
remove_onion_service hubzilla ${HUBZILLA_ONION_PORT} remove_onion_service hubzilla ${HUBZILLA_ONION_PORT}
sed -i '/install_hubzilla/d' $COMPLETION_FILE sed -i '/hubzilla/d' $COMPLETION_FILE
sed -i '/Hubzilla /d' $COMPLETION_FILE
echo $'Hubzilla was removed' echo $'Hubzilla was removed'
} }
@ -428,10 +427,10 @@ function install_hubzilla {
function_check git_clone function_check git_clone
git_clone $HUBZILLA_REPO hubzilla git_clone $HUBZILLA_REPO hubzilla
git checkout $HUBZILLA_COMMIT -b $HUBZILLA_COMMIT git checkout $HUBZILLA_COMMIT -b $HUBZILLA_COMMIT
if ! grep -q "Hubzilla commit" $COMPLETION_FILE; then if ! grep -q "hubzilla commit" $COMPLETION_FILE; then
echo "Hubzilla commit:$HUBZILLA_COMMIT" >> $COMPLETION_FILE echo "hubzilla commit:$HUBZILLA_COMMIT" >> $COMPLETION_FILE
else else
sed -i "s/Hubzilla commit.*/Hubzilla commit:$HUBZILLA_COMMIT/g" $COMPLETION_FILE sed -i "s/hubzilla commit.*/hubzilla commit:$HUBZILLA_COMMIT/g" $COMPLETION_FILE
fi fi
rm -rf $HUBZILLA_PATH rm -rf $HUBZILLA_PATH
@ -440,10 +439,10 @@ function install_hubzilla {
git_clone $HUBZILLA_ADDONS_REPO $HUBZILLA_PATH/addon git_clone $HUBZILLA_ADDONS_REPO $HUBZILLA_PATH/addon
cd $HUBZILLA_PATH/addon cd $HUBZILLA_PATH/addon
git checkout $HUBZILLA_ADDONS_COMMIT -b $HUBZILLA_ADDONS_COMMIT git checkout $HUBZILLA_ADDONS_COMMIT -b $HUBZILLA_ADDONS_COMMIT
if ! grep -q "Hubzilla addons commit" $COMPLETION_FILE; then if ! grep -q "hubzilla addons commit" $COMPLETION_FILE; then
echo "Hubzilla addons commit:$HUBZILLA_ADDONS_COMMIT" >> $COMPLETION_FILE echo "hubzilla addons commit:$HUBZILLA_ADDONS_COMMIT" >> $COMPLETION_FILE
else else
sed -i "s/Hubzilla addons commit.*/Hubzilla addons commit:$HUBZILLA_ADDONS_COMMIT/g" $COMPLETION_FILE sed -i "s/hubzilla addons commit.*/hubzilla addons commit:$HUBZILLA_ADDONS_COMMIT/g" $COMPLETION_FILE
fi fi
# some extra themes # some extra themes
@ -700,7 +699,7 @@ function install_hubzilla {
${PROJECT_NAME}-addemail -u $MY_USERNAME -e "noreply@$HUBZILLA_DOMAIN_NAME" -g hubzilla --public no ${PROJECT_NAME}-addemail -u $MY_USERNAME -e "noreply@$HUBZILLA_DOMAIN_NAME" -g hubzilla --public no
echo "Hubzilla domain:${HUBZILLA_DOMAIN_NAME}" >> $COMPLETION_FILE echo "hubzilla domain:${HUBZILLA_DOMAIN_NAME}" >> $COMPLETION_FILE
} }
# NOTE: deliberately there is no "exit 0" # NOTE: deliberately there is no "exit 0"

View File

@ -73,6 +73,7 @@ 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|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
if [ -f /usr/local/bin/zeronetavahi ]; then if [ -f /usr/local/bin/zeronetavahi ]; then
rm /usr/local/bin/zeronetavahi rm /usr/local/bin/zeronetavahi