-
Notifications
You must be signed in to change notification settings - Fork 55
/
startup.sh
35 lines (35 loc) · 1.36 KB
/
startup.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#!/bin/sh
if [ "${LISTEN_PORT}" ]; then
sed -i -e "s/\"LISTEN_PORT\":[^,]*/\"LISTEN_PORT\": ${LISTEN_PORT}/g" /app/config.json
fi
if [ "${DATE}" ]; then
sed -i -e "s/\"DATE\":[^,]*/\"DATE\": \"${DATE}\"/g" /app/config.json
fi
if [ "${DATE_TOLERANCE}" ]; then
sed -i -e "s/\"DATE_TOLERANCE\":[^,]*/\"DATE_TOLERANCE\": ${DATE_TOLERANCE}/g" /app/config.json
fi
if [ "${GEOCITIES_FIX}" ]; then
sed -i -e "s/\"GEOCITIES_FIX\":[^,]*/\"GEOCITIES_FIX\": $GEOCITIES_FIX/g" /app/config.json
fi
if [ "${QUICK_IMAGES}" ]; then
sed -i -e "s/\"QUICK_IMAGES\":[^,]*/\"QUICK_IMAGES\": $QUICK_IMAGES/g" /app/config.json
fi
if [ "${WAYBACK_API}" ]; then
sed -i -e "s/\"WAYBACK_API\":[^,]*/\"WAYBACK_API\": $WAYBACK_API/g" /app/config.json
fi
if [ "${QUICK_IMAGES}" ]; then
sed -i -e "s/\"QUICK_IMAGES\":[^,]*/\"QUICK_IMAGES\": $QUICK_IMAGES/g" /app/config.json
fi
if [ "${CONTENT_TYPE_ENCODING}" ]; then
sed -i -e "s/\"CONTENT_TYPE_ENCODING\":[^,]*/\"CONTENT_TYPE_ENCODING\": $CONTENT_TYPE_ENCODING/g" /app/config.json
fi
if [ "${SILENT}" ]; then
sed -i -e "s/\"SILENT\":[^,]*/\"SILENT\": $SILENT/g" /app/config.json
fi
if [ "${SETTINGS_PAGE}" ]; then
sed -i -e "s/\"SETTINGS_PAGE\":[^,]*/\"SETTINGS_PAGE\": $SETTINGS_PAGE/g" /app/config.json
fi
echo "[-] Using this config.json file:"
cat /app/config.json
echo "\n[-] Starting proxy server"
python /app/waybackproxy.py