cosmic-rss generates gopher too

This commit is contained in:
James Tomasino 2018-11-27 09:20:00 -05:00
parent 3589312bf8
commit 1c777b4d9a
1 changed files with 2 additions and 0 deletions

View File

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