forked from reddit-archive/reddit
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Restore old runscripts for backwards compatibility.
These are still deprecated, but they are necessary to keep running if you installed before the Natty installer.
- Loading branch information
Showing
12 changed files
with
576 additions
and
0 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
#!/bin/sh | ||
umask 0027 | ||
exec setuidgid reddit multilog ./main |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
#!/bin/sh | ||
|
||
ulimit -n 32768 | ||
|
||
exec 2>&1 | ||
exec setuidgid reddit cassandra -f |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
|
||
global | ||
maxconn 100000 | ||
spread-checks 50 | ||
#stats socket /tmp/haproxy mode 777 | ||
|
||
|
||
frontend frontend 0.0.0.0:80 | ||
mode http | ||
maxconn 50000 | ||
timeout client 10000 | ||
option forwardfor except 127.0.0.1 | ||
option httpclose | ||
|
||
option httplog | ||
log /dev/log local4 | ||
capture request header User-Agent len 150 | ||
capture request header Host len 50 | ||
capture request header Referer len 300 | ||
capture request header X-Forwarded-For len 15 | ||
capture request header True-Client-Ip len 15 | ||
capture request header If-Modified-Since len 50 | ||
capture cookie reddit_session= len 25 | ||
|
||
# make comescore a static thing | ||
reqrep ^(.*)/comscore-iframe/(.*) \1/static/comscore.html?path=\2 | ||
|
||
|
||
# make the iphone url pretty | ||
reqirep ^GET\ /iphone/(.*) GET\ /static/iphone/\1 | ||
|
||
# make the socialite url pretty | ||
reqirep ^GET\ /socialite/(.*) GET\ /static/socialite/\1 | ||
|
||
# make the redditaddict url pretty | ||
reqirep ^GET\ /redditaddict/(.*) GET\ /static/redditaddict/\1 | ||
|
||
######## | ||
# button rewrites | ||
reqirep ^GET\ /button\.js\ (.*) GET\ /static/button/button1.js\ \1 | ||
reqirep ^GET\ /button\.js\?t=([0-9])\ (.*) GET\ /static/button/button\1.js\ \2 | ||
reqirep ^GET\ /r/(.*)/button\.js\?t=([0-9])\ (.*) GET\ /static/button/button\2.js\ \3 | ||
reqirep ^GET\ /button\.js\?t=([0-9])&width=[0-9]+&height=[0-9]+\ (.*) GET\ /static/button/button\1.js\ \2 | ||
|
||
### acls | ||
|
||
#ssl only to pay urls | ||
acl sslrequest src 127.0.0.1 | ||
acl sslallowed path_beg /promoted | ||
acl sslallowed path_beg /static | ||
acl sslallowed path_beg /api | ||
|
||
default_backend dynamic | ||
|
||
backend dynamic | ||
mode http | ||
timeout connect 4000 | ||
timeout server 30000 | ||
timeout queue 60000 | ||
balance roundrobin | ||
capture cookie reddit_session= len 25 | ||
option httpchk GET /health HTTP/1.1\r\nHost:\ reddit.local | ||
|
||
server app01-8001 localhost:8001 maxconn 1 check fall 1 | ||
server app01-8002 localhost:8002 maxconn 1 check fall 1 | ||
|
||
listen stats 0.0.0.0:9000 | ||
mode http | ||
balance | ||
timeout client 5000 | ||
timeout connect 4000 | ||
timeout server 30000 | ||
stats uri /haproxy_stats | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
#!/bin/sh | ||
umask 0027 | ||
exec setuidgid reddit multilog ./main |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
#!/bin/sh | ||
|
||
ulimit -n 32768 | ||
|
||
cd ~reddit | ||
exec 2>&1 | ||
exec /usr/sbin/haproxy -f /home/reddit/srv/haproxy/haproxy.conf |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
#!/bin/sh | ||
umask 0027 | ||
exec setuidgid reddit multilog ./main |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
#!/bin/sh | ||
|
||
exec 2>&1 | ||
exec /usr/bin/memcached -m512 -p11211 -U11211 -C -c10000 -u reddit -Bauto |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
#!/bin/sh | ||
umask 0027 | ||
exec setuidgid reddit multilog ./main |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
#!/bin/sh | ||
|
||
cd /home/reddit/reddit/r2 | ||
exec 2>&1 | ||
exec setuidgid reddit /usr/local/bin/paster serve run.ini http_port=8001 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
#!/bin/sh | ||
umask 0027 | ||
exec setuidgid reddit multilog ./main |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
#!/bin/sh | ||
|
||
cd /home/reddit/reddit/r2 | ||
exec 2>&1 | ||
exec setuidgid reddit /usr/local/bin/paster serve run.ini http_port=8002 |