diff --git a/bin/backup b/bin/backup index 7aadfcd..a723916 100755 --- a/bin/backup +++ b/bin/backup @@ -3,6 +3,8 @@ rsync -avzh --delete --include=".description" --exclude=".*" /var/gopher/ /var/cosmic-backup/gopher/ rsync -avzh --delete --exclude=".*" /var/wiki/ /var/cosmic-backup/wiki/ cd /var/cosmic-backup || exit +rm ./gopher/rss.xml # skip archival of rss feed +rm ./gopher/atom.xml # skip archival of atom feed git add . git commit -m "backup" git push origin master diff --git a/bin/gemini b/bin/gemini index b4c6b4a..9871245 100755 --- a/bin/gemini +++ b/bin/gemini @@ -12,16 +12,16 @@ if [ "$run_user" = "gemini" ]; then # generate index pages # curl -s gopher://localhost | /var/cosmic/awk/gophermap2gemini.awk > /var/gemini/index.gmi cp /var/cosmic/templates/geminiintro.tmpl /var/gemini/index.gmi - curl -s gopher://localhost/1/listing.gophermap | head -n 20 | /var/cosmic/awk/gophermap2gemini.awk >> /var/gemini/index.gmi - curl -s gopher://localhost/1/log | /var/cosmic/awk/gophermap2gemini.awk > /var/gemini/log/index.gmi - curl -s gopher://localhost/1/ships | /var/cosmic/awk/gophermap2gemini.awk > /var/gemini/ships/index.gmi + curl -s -N gopher://localhost/1/listing.gophermap | head -n 20 | /var/cosmic/awk/gophermap2gemini.awk >> /var/gemini/index.gmi + curl -s -N gopher://localhost/1/log | /var/cosmic/awk/gophermap2gemini.awk > /var/gemini/log/index.gmi + curl -s -N gopher://localhost/1/ships | /var/cosmic/awk/gophermap2gemini.awk > /var/gemini/ships/index.gmi sed 's?gopher://cosmic.voyage/0/?gemini://cosmic.voyage/?' /var/gopher/rss.xml | sed 's?gopher://cosmic.voyage?gemini://cosmic.voyage?' > /var/gemini/rss.xml sed 's?gopher://cosmic.voyage/0/?gemini://cosmic.voyage/?' /var/gopher/atom.xml | sed 's?gopher://cosmic.voyage?gemini://cosmic.voyage?' > /var/gemini/atom.xml # create ship directories find "/var/gopher/" -maxdepth 1 ! -path "/var/gopher/" ! -path "/var/gopher/ships" ! -path "/var/gopher/log" -type d | sed 's|/var/gopher/||' | sort | while read -r ship do - curl -s "gopher://localhost/1/ships/${ship}" | /var/cosmic/awk/gophermap2gemini.awk > "/var/gemini/ships/${ship}/index.gmi" + curl -s -N "gopher://localhost/1/ships/${ship}" | /var/cosmic/awk/gophermap2gemini.awk > "/var/gemini/ships/${ship}/index.gmi" done # Let user's know it's done printf "Gemini and gemini feeds rebuilt successfully.\\n" diff --git a/bin/web b/bin/web index 5f7441a..b029b8b 100755 --- a/bin/web +++ b/bin/web @@ -27,7 +27,6 @@ entry_index () { { printf "
\\n" printf "<< BACK TO RELAY ONE LOG\\n\\n\\n" sed 's/&/\&/g; s/\</g; s/>/\>/g; s/"/\"/g; s/'"'"'/\'/g' "${gopher_dir}${log}" @@ -47,7 +46,6 @@ if [ "$run_user" = "root" ] || [ "$run_user" = "publish" ]; then root_index_html="${temp_dir}/index.html" log_html="${temp_dir}/log/index.html" web_header_html="/etc/templates/webheader.tmpl" - web_styles_html="/etc/templates/webstyles.tmpl" ships_html="${temp_dir}/ships/index.html" error_html="${temp_dir}/error.html" join_html="${temp_dir}/join.html" @@ -74,10 +72,9 @@ if [ "$run_user" = "root" ] || [ "$run_user" = "publish" ]; then printf "" printf "" printf "" - cat "$web_styles_html" printf "" printf "" - printf "a link to our mastodon account, to verify it as legitimate" + printf "a link to our mastodon account, to verify it as legitimate" printf "" printf "" # Intro text @@ -102,7 +99,6 @@ if [ "$run_user" = "root" ] || [ "$run_user" = "publish" ]; then { printf "Cosmic Voyage - Transmission Log " printf "" - cat "$web_styles_html" printf "" printf "" printf "" @@ -165,7 +161,6 @@ if [ "$run_user" = "root" ] || [ "$run_user" = "publish" ]; then { printf "Cosmic Voyage - Ships " printf "" - cat "$web_styles_html" printf "" printf "" printf "" @@ -195,7 +190,6 @@ if [ "$run_user" = "root" ] || [ "$run_user" = "publish" ]; then { printf "Cosmic Voyage - %s " "$ship" printf "" "$ship" - cat "$web_styles_html" printf "" printf "" printf "" @@ -218,7 +212,6 @@ if [ "$run_user" = "root" ] || [ "$run_user" = "publish" ]; then { printf "Cosmic Voyage - About %s " "${ship}" printf "" "${ship}" - cat "$web_styles_html" printf "" printf "" printf "" @@ -245,7 +238,6 @@ if [ "$run_user" = "root" ] || [ "$run_user" = "publish" ]; then { printf "Cosmic Voyage - \"%s\" Author " "${ship}" printf "" "${ship}" - cat "$web_styles_html" printf "" printf "" printf "" @@ -281,7 +273,6 @@ if [ "$run_user" = "root" ] || [ "$run_user" = "publish" ]; then # Print error page cat "$web_header_html" > "${error_html}" { - cat "$web_styles_html" printf "<< BACK TO RELAY ONE" printf "\\n\\n\\nERROR. TRANSMISSION NOT FOUND.