cosmic-rss generates gopher too

This commit is contained in:
James Tomasino 2018-11-27 09:20:00 -05:00
parent 3589312bf8
commit 1c777b4d9a

View File

@ -3,6 +3,7 @@
run_user=$(id -u) run_user=$(id -u)
if [ "$run_user" -eq 0 ]; then if [ "$run_user" -eq 0 ]; then
file_rss="/var/www/html/rss.xml" file_rss="/var/www/html/rss.xml"
gopher_rss="/var/gopher/rss.xml"
# Add header info to xml output # Add header info to xml output
{ {
@ -38,6 +39,7 @@ if [ "$run_user" -eq 0 ]; then
printf "</channel>\\n" printf "</channel>\\n"
printf "</rss>\\n" printf "</rss>\\n"
} >> "${file_rss}" } >> "${file_rss}"
cp "${file_rss}" "${gopher_rss}"
else else
printf "You must be root to run this script.\\n" printf "You must be root to run this script.\\n"
fi fi