diff options
author | Hsieh Chin Fan <pham@topo.tw> | 2024-12-13 00:11:11 +0800 |
---|---|---|
committer | Hsieh Chin Fan <pham@topo.tw> | 2024-12-13 00:11:11 +0800 |
commit | c7cb1c961d73cf2f4d9ef82f98fe65f13bd4e4c1 (patch) | |
tree | 64ebc86479d7954fe0e4253a48b92a0840e3b375 | |
parent | 43f092aeba8ff4b345efbfedece63cb437fc1518 (diff) |
Update for RSS
-rw-r--r-- | nginx/sites-available/vps | 4 | ||||
-rw-r--r-- | www/Makefile | 2 | ||||
-rwxr-xr-x | www/scripts/update-feeds.sh | 8 |
3 files changed, 7 insertions, 7 deletions
diff --git a/nginx/sites-available/vps b/nginx/sites-available/vps index b2e40f2..75a789b 100644 --- a/nginx/sites-available/vps +++ b/nginx/sites-available/vps | |||
@@ -76,8 +76,8 @@ server { | |||
76 | error_log /tmp/cgi info; | 76 | error_log /tmp/cgi info; |
77 | } | 77 | } |
78 | 78 | ||
79 | location ^~ /links/feeds/ { | 79 | location ^~ /links/rss/ { |
80 | alias /srv/rss/feeds/; | 80 | alias /srv/rss/; |
81 | } | 81 | } |
82 | 82 | ||
83 | location ~ [^/]$ { | 83 | location ~ [^/]$ { |
diff --git a/www/Makefile b/www/Makefile index d54081b..ab6a39e 100644 --- a/www/Makefile +++ b/www/Makefile | |||
@@ -15,4 +15,4 @@ frontmatter: | |||
15 | rss: | 15 | rss: |
16 | cd /srv/rss | 16 | cd /srv/rss |
17 | export LIST=~/log/public/links/rss.list | 17 | export LIST=~/log/public/links/rss.list |
18 | $(ROOT_DIR)/scripts/update-feeds.sh | 18 | $(ROOT_DIR)scripts/update-feeds.sh |
diff --git a/www/scripts/update-feeds.sh b/www/scripts/update-feeds.sh index 8dff837..cb7da02 100755 --- a/www/scripts/update-feeds.sh +++ b/www/scripts/update-feeds.sh | |||
@@ -1,13 +1,13 @@ | |||
1 | #! /bin/bash | 1 | #! /bin/bash |
2 | 2 | ||
3 | cd /srv/rss | ||
4 | mkdir -p feeds | ||
5 | |||
6 | LIST=${LIST:?} | 3 | LIST=${LIST:?} |
7 | curlOpts='--insecure' | 4 | curlOpts='--insecure' |
8 | 5 | ||
6 | ln -sf ${LIST} $(basename $LIST) | ||
7 | ln -sf $0 $(basename $0) | ||
8 | |||
9 | cat "${LIST}" | while read url interval tags; do | 9 | cat "${LIST}" | while read url interval tags; do |
10 | feed=feeds/${url//\//%2F} | 10 | feed=${url//\//%2F} |
11 | unset next_fetch; declare -i next_fetch=0 | 11 | unset next_fetch; declare -i next_fetch=0 |
12 | 12 | ||
13 | # Get time of next fetch | 13 | # Get time of next fetch |