lower case

This commit is contained in:
Bob Mottram 2016-10-02 12:44:40 +01:00
parent 2e65073356
commit c9435e5c8f
4 changed files with 25 additions and 23 deletions

View File

@ -83,7 +83,7 @@ function reconfigure_rss {
function upgrade_rss { function upgrade_rss {
if grep -Fxq "install_rss" $COMPLETION_FILE; then if grep -Fxq "install_rss" $COMPLETION_FILE; then
function_check set_repo_commit function_check set_repo_commit
set_repo_commit $RSS_READER_PATH "RSS reader commit" "$RSS_READER_COMMIT" $RSS_READER_REPO set_repo_commit $RSS_READER_PATH "rss reader commit" "$RSS_READER_COMMIT" $RSS_READER_REPO
function_check rss_modifications function_check rss_modifications
rss_modifications rss_modifications
fi fi
@ -104,26 +104,26 @@ function upgrade_rss {
if [ -d $RSS_READER_PATH/g2ttree-mobile ]; then if [ -d $RSS_READER_PATH/g2ttree-mobile ]; then
if grep -Fxq "install_rss_mobile_reader" $COMPLETION_FILE; then if grep -Fxq "install_rss_mobile_reader" $COMPLETION_FILE; then
sed -i '/install_rss_mobile_reader/d' $COMPLETION_FILE sed -i '/install_rss_mobile_reader/d' $COMPLETION_FILE
sed -i '/RSS mobile reader commit/d' $COMPLETION_FILE sed -i '/rss mobile reader commit/d' $COMPLETION_FILE
rm -rf $RSS_READER_PATH/g2ttree-mobile rm -rf $RSS_READER_PATH/g2ttree-mobile
fi fi
fi fi
# update to the next commit # update to the next commit
function_check set_repo_commit function_check set_repo_commit
set_repo_commit $RSS_MOBILE_READER_PATH "RSS mobile reader commit" "$RSS_MOBILE_READER_COMMIT" $RSS_MOBILE_READER_REPO set_repo_commit $RSS_MOBILE_READER_PATH "rss mobile reader commit" "$RSS_MOBILE_READER_COMMIT" $RSS_MOBILE_READER_REPO
fi fi
} }
function backup_local_rss { function backup_local_rss {
RSS_READER_DOMAIN_NAME='ttrss' RSS_READER_DOMAIN_NAME='ttrss'
if grep -q "RSS reader domain" $COMPLETION_FILE; then if grep -q "rss reader domain" $COMPLETION_FILE; then
RSS_READER_DOMAIN_NAME=$(cat $COMPLETION_FILE | grep "RSS reader domain" | awk -F ':' '{print $2}') RSS_READER_DOMAIN_NAME=$(cat $COMPLETION_FILE | grep "rss reader domain" | awk -F ':' '{print $2}')
fi fi
if grep -q "RSS reader domain" $COMPLETION_FILE; then if grep -q "rss reader domain" $COMPLETION_FILE; then
if [ -d /etc/share/tt-rss ]; then if [ -d /etc/share/tt-rss ]; then
RSS_READER_DOMAIN_NAME=$(cat $COMPLETION_FILE | grep "RSS reader domain" | awk -F ':' '{print $2}') RSS_READER_DOMAIN_NAME=$(cat $COMPLETION_FILE | grep "rss reader domain" | awk -F ':' '{print $2}')
echo $"Backing up ttrss" echo $"Backing up ttrss"
@ -138,10 +138,10 @@ function backup_local_rss {
} }
function restore_local_rss { function restore_local_rss {
if ! grep -q "RSS reader domain" $COMPLETION_FILE; then if ! grep -q "rss reader domain" $COMPLETION_FILE; then
return return
fi fi
RSS_READER_DOMAIN_NAME=$(cat $COMPLETION_FILE | grep "RSS reader domain" | awk -F ':' '{print $2}') RSS_READER_DOMAIN_NAME=$(cat $COMPLETION_FILE | grep "rss reader domain" | awk -F ':' '{print $2}')
if [ $RSS_READER_DOMAIN_NAME ]; then if [ $RSS_READER_DOMAIN_NAME ]; then
echo $"Restoring ttrss" echo $"Restoring ttrss"
temp_restore_dir=/root/tempttrss temp_restore_dir=/root/tempttrss
@ -189,8 +189,8 @@ function restore_local_rss {
} }
function backup_remote_rss { function backup_remote_rss {
if grep -q "RSS reader domain" $COMPLETION_FILE; then if grep -q "rss reader domain" $COMPLETION_FILE; then
RSS_READER_DOMAIN_NAME=$(cat $COMPLETION_FILE | grep "RSS reader domain" | awk -F ':' '{print $2}') RSS_READER_DOMAIN_NAME=$(cat $COMPLETION_FILE | grep "rss reader domain" | awk -F ':' '{print $2}')
if [ -d /etc/share/tt-rss ]; then if [ -d /etc/share/tt-rss ]; then
function_check suspend_site function_check suspend_site
suspend_site ${RSS_READER_DOMAIN_NAME} suspend_site ${RSS_READER_DOMAIN_NAME}
@ -212,9 +212,9 @@ function backup_remote_rss {
} }
function restore_remote_rss { function restore_remote_rss {
if grep -q "RSS reader domain" $COMPLETION_FILE; then if grep -q "rss reader domain" $COMPLETION_FILE; then
echo $"Restoring ttrss" echo $"Restoring ttrss"
RSS_READER_DOMAIN_NAME=$(cat $COMPLETION_FILE | grep "RSS reader domain" | awk -F ':' '{print $2}') RSS_READER_DOMAIN_NAME=$(cat $COMPLETION_FILE | grep "rss reader domain" | awk -F ':' '{print $2}')
function_check restore_database_from_friend function_check restore_database_from_friend
function_check rss_create_database function_check rss_create_database
@ -311,8 +311,8 @@ function install_rss_main {
fi fi
cd $RSS_READER_PATH cd $RSS_READER_PATH
git checkout $RSS_READER_COMMIT -b $RSS_READER_COMMIT git checkout $RSS_READER_COMMIT -b $RSS_READER_COMMIT
if ! grep -q "RSS reader commit" $COMPLETION_FILE; then if ! grep -q "rss reader commit" $COMPLETION_FILE; then
echo "RSS reader commit:$RSS_READER_COMMIT" >> $COMPLETION_FILE echo "rss reader commit:$RSS_READER_COMMIT" >> $COMPLETION_FILE
fi fi
function_check install_mariadb function_check install_mariadb
@ -580,7 +580,7 @@ function install_rss_mobile_reader {
if [ -d $RSS_READER_PATH/g2ttree-mobile ]; then if [ -d $RSS_READER_PATH/g2ttree-mobile ]; then
if grep -Fxq "install_rss_mobile_reader" $COMPLETION_FILE; then if grep -Fxq "install_rss_mobile_reader" $COMPLETION_FILE; then
sed -i '/install_rss_mobile_reader/d' $COMPLETION_FILE sed -i '/install_rss_mobile_reader/d' $COMPLETION_FILE
sed -i '/RSS mobile reader commit/d' $COMPLETION_FILE sed -i '/rss mobile reader commit/d' $COMPLETION_FILE
rm -rf $RSS_READER_PATH/g2ttree-mobile rm -rf $RSS_READER_PATH/g2ttree-mobile
fi fi
fi fi
@ -598,8 +598,8 @@ function install_rss_mobile_reader {
fi fi
cd $RSS_MOBILE_READER_PATH cd $RSS_MOBILE_READER_PATH
git checkout $RSS_MOBILE_READER_COMMIT -b $RSS_MOBILE_READER_COMMIT git checkout $RSS_MOBILE_READER_COMMIT -b $RSS_MOBILE_READER_COMMIT
if ! grep -q "RSS mobile reader commit" $COMPLETION_FILE; then if ! grep -q "rss mobile reader commit" $COMPLETION_FILE; then
echo "RSS mobile reader commit:$RSS_MOBILE_READER_COMMIT" >> $COMPLETION_FILE echo "rss mobile reader commit:$RSS_MOBILE_READER_COMMIT" >> $COMPLETION_FILE
fi fi
echo 'define({' > $RSS_MOBILE_READER_PATH/scripts/conf.js echo 'define({' > $RSS_MOBILE_READER_PATH/scripts/conf.js

View File

@ -77,7 +77,7 @@ function reconfigure_webmail {
function upgrade_webmail { function upgrade_webmail {
function_check set_repo_commit function_check set_repo_commit
set_repo_commit $WEBMAIL_PATH "Webmail commit" "$WEBMAIL_COMMIT" $WEBMAIL_REPO set_repo_commit $WEBMAIL_PATH "webmail commit" "$WEBMAIL_COMMIT" $WEBMAIL_REPO
} }
function backup_local_webmail { function backup_local_webmail {
@ -159,10 +159,10 @@ function install_webmail {
git_clone $WEBMAIL_REPO webmail git_clone $WEBMAIL_REPO webmail
cd $WEBMAIL_PATH cd $WEBMAIL_PATH
git checkout $WEBMAIL_COMMIT -b $WEBMAIL_COMMIT git checkout $WEBMAIL_COMMIT -b $WEBMAIL_COMMIT
if ! grep -q "Webmail commit" $COMPLETION_FILE; then if ! grep -q "webmail commit" $COMPLETION_FILE; then
echo "Webmail commit:$WEBMAIL_COMMIT" >> $COMPLETION_FILE echo "webmail commit:$WEBMAIL_COMMIT" >> $COMPLETION_FILE
else else
sed -i "s/Webmail commit.*/Webmail commit:$WEBMAIL_COMMIT/g" $COMPLETION_FILE sed -i "s/webmail commit.*/webmail commit:$WEBMAIL_COMMIT/g" $COMPLETION_FILE
fi fi
fi fi
if [ ! -f $WEBMAIL_PATH/index.php ]; then if [ ! -f $WEBMAIL_PATH/index.php ]; then

View File

@ -369,7 +369,7 @@ function show_domains {
fi fi
done done
if grep -q "RSS reader domain" $COMPLETION_FILE; then if grep -q "rss reader domain" $COMPLETION_FILE; then
if [ -d /var/lib/tor/hidden_service_ttrss ]; then if [ -d /var/lib/tor/hidden_service_ttrss ]; then
echo -n -e "$(pad_string 'RSS reader')" echo -n -e "$(pad_string 'RSS reader')"
RSSDOM='-' RSSDOM='-'

View File

@ -76,6 +76,8 @@ function upgrade_installation_from_previous_versions {
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|Gogs|gogs|g' $COMPLETION_FILE
sed -i 's|Wiki|wiki|g' $COMPLETION_FILE sed -i 's|Wiki|wiki|g' $COMPLETION_FILE
sed -i 's|RSS|rss|g' $COMPLETION_FILE
sed -i 's|Webmail|webmail|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