浏览代码

Commit after rss modifications

Bob Mottram 8 年前
父节点
当前提交
c1ac920a87
共有 1 个文件被更改,包括 9 次插入0 次删除
  1. 9
    0
      src/freedombone-app-rss

+ 9
- 0
src/freedombone-app-rss 查看文件

@@ -271,14 +271,23 @@ function rss_modifications {
271 271
         return
272 272
     fi
273 273
 
274
+    rss_modified=
275
+
274 276
     # ensure that socks5 proxy is used
275 277
     if ! grep -q "CURLPROXY_SOCKS5" $RSS_READER_PATH/plugins/af_unburn/init.php; then
276 278
         sed -i '/curl_setopt($ch, CURLOPT_PROXY, _CURL_HTTP_PROXY);/a \\t\t\t\t\tcurl_setopt($ch, CURLOPT_PROXYTYPE, CURLPROXY_SOCKS5);' $RSS_READER_PATH/plugins/af_unburn/init.php
279
+        rss_modified=1
277 280
     fi
278 281
     if ! grep -q "CURLPROXY_SOCKS5" $RSS_READER_PATH/include/functions.php; then
279 282
         sed -i '/curl_setopt($ch, CURLOPT_PROXY, _CURL_HTTP_PROXY);/a \\t\t\t\tcurl_setopt($ch, CURLOPT_PROXYTYPE, CURLPROXY_SOCKS5);' $RSS_READER_PATH/include/functions.php
283
+        rss_modified=1
284
+    fi
285
+    if [ $rss_modified ]; then
286
+        cd $RSS_READER_PATH
287
+        git commit -a -m"Modify for Tor proxying"
280 288
     fi
281 289
     chown -R www-data:www-data $RSS_READER_PATH
290
+
282 291
     chmod a+x $RSS_READER_PATH
283 292
 }
284 293