@@ -12,4 +12,4 @@ | |||||
- "bubble.sql.gz" | - "bubble.sql.gz" | ||||
- name: Populate database | - name: Populate database | ||||
shell: sudo -H -u postgres bash -c "cd && full_reset_db.sh" | |||||
shell: su - postgres bash -c "full_reset_db.sh" |
@@ -4,15 +4,15 @@ | |||||
- name: Set hostname to {{ hostname }} | - name: Set hostname to {{ hostname }} | ||||
hostname: | hostname: | ||||
name: '{{ hostname }}' | name: '{{ hostname }}' | ||||
when: bubble_set_hostname == 'true' | |||||
when: bubble_set_hostname | |||||
- name: Set system timezone via timedatectl | - name: Set system timezone via timedatectl | ||||
shell: timedatectl set-timezone {{ time_zone }} | |||||
when: bubble_set_timezone_script != 'true' | |||||
shell: timedatectl set-timezone {{ time_zone }} || echo "bubble_set_timezone_script was {{ bubble_set_timezone_script }}" >> /tmp/WTF.txt | |||||
when: not bubble_set_timezone_script | |||||
- name: Set system timezone via script | - name: Set system timezone via script | ||||
shell: bash -c "function set_tz () { TZ=${1:?no timezone} ; ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone ; } ; set_tz {{ time_zone }}" | shell: bash -c "function set_tz () { TZ=${1:?no timezone} ; ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone ; } ; set_tz {{ time_zone }}" | ||||
when: bubble_set_timezone_script == 'true' | |||||
when: bubble_set_timezone_script | |||||
- name: Set log flag to true with EX of 7 days for non-sage nodes | - name: Set log flag to true with EX of 7 days for non-sage nodes | ||||
shell: echo 'set bubble.StandardSelfNodeService.bubble_server_logs_enabled "true" EX 604800' | redis-cli | shell: echo 'set bubble.StandardSelfNodeService.bubble_server_logs_enabled "true" EX 604800' | redis-cli | ||||
@@ -5,7 +5,7 @@ stderr_logfile = /var/log/bubble/api-server-err.log | |||||
command=bash -c 'chmod 0666 /dev/null && \ | command=bash -c 'chmod 0666 /dev/null && \ | ||||
rm -rf /var/log/bubble/postgresql/* && \ | rm -rf /var/log/bubble/postgresql/* && \ | ||||
service postgresql restart && \ | service postgresql restart && \ | ||||
sudo -u bubble bash -c "/usr/bin/java \ | |||||
su - bubble bash -c "/usr/bin/java \ | |||||
-Dfile.encoding=UTF-8 -Djava.net.preferIPv4Stack=true \ | -Dfile.encoding=UTF-8 -Djava.net.preferIPv4Stack=true \ | ||||
-XX:+UseG1GC -XX:MaxGCPauseMillis=400 {{ bubble_java_opts }} \ | -XX:+UseG1GC -XX:MaxGCPauseMillis=400 {{ bubble_java_opts }} \ | ||||
-cp /home/bubble/api/bubble.jar \ | -cp /home/bubble/api/bubble.jar \ | ||||
@@ -2,6 +2,6 @@ | |||||
[program:mitm{{ port }}] | [program:mitm{{ port }}] | ||||
stdout_logfile = /var/log/bubble/mitm{{ port }}-out.log | stdout_logfile = /var/log/bubble/mitm{{ port }}-out.log | ||||
stderr_logfile = /var/log/bubble/mitm{{ port }}-err.log | stderr_logfile = /var/log/bubble/mitm{{ port }}-err.log | ||||
command=sudo -H -u mitmproxy bash -c "/home/mitmproxy/mitmproxy/run_mitm.sh {{ port }}" | |||||
command=su - mitmproxy bash -c "/home/mitmproxy/mitmproxy/run_mitm.sh {{ port }}" | |||||
stopasgroup=true | stopasgroup=true | ||||
stopsignal=QUIT | stopsignal=QUIT |
@@ -89,11 +89,11 @@ def show_block_stats(client_addr, fqdns): | |||||
for fqdn in fqdns: | for fqdn in fqdns: | ||||
show = REDIS.get(REDIS_KEY_DEVICE_SHOW_BLOCK_STATS+client_addr+':'+fqdn) | show = REDIS.get(REDIS_KEY_DEVICE_SHOW_BLOCK_STATS+client_addr+':'+fqdn) | ||||
if show is not None: | if show is not None: | ||||
return show.decode() == 'true' | |||||
return show.decode().lower() == 'true' | |||||
show = REDIS.get(REDIS_KEY_DEVICE_SHOW_BLOCK_STATS+client_addr) | show = REDIS.get(REDIS_KEY_DEVICE_SHOW_BLOCK_STATS+client_addr) | ||||
if show is None: | if show is None: | ||||
return False | return False | ||||
return show.decode() == 'true' | |||||
return show.decode().lower() == 'true' | |||||
def conn_check_cache_prefix(client_addr, server_addr): | def conn_check_cache_prefix(client_addr, server_addr): | ||||
@@ -71,19 +71,20 @@ | |||||
}, | }, | ||||
// Docker can be used for testing or for advanced use cases | // Docker can be used for testing or for advanced use cases | ||||
"DockerCompute": { | |||||
"config": {}, | |||||
"credentials": { | |||||
// these are the default settings, change as needed | |||||
"host": "unix:///var/run/docker.sock", | |||||
"tlsVerify": "false", // if tlsVerify is "true" then certPath must be set | |||||
"certPath": null, | |||||
"registryUrl": null, | |||||
"registryUsername": null, | |||||
"registryEmail": null, | |||||
"registryPassword": null | |||||
} | |||||
}, | |||||
// Leave this out if you're not going to use it | |||||
// "DockerCompute": { | |||||
// "config": {}, | |||||
// "credentials": { | |||||
// // these are the default settings, change as needed | |||||
// "host": "unix:///var/run/docker.sock", | |||||
// "tlsVerify": "false", // if tlsVerify is "true" then certPath must be set | |||||
// "certPath": null, | |||||
// "registryUrl": null, | |||||
// "registryUsername": null, | |||||
// "registryEmail": null, | |||||
// "registryPassword": null | |||||
// } | |||||
// }, | |||||
/////////////////////// | /////////////////////// | ||||
// Storage | // Storage | ||||
@@ -0,0 +1,5 @@ | |||||
Bubble Docs | |||||
=========== | |||||
The best place to start is on the [Bubble Main Page](../README.md). | |||||
Or maybe you want to check out the [Bubble Website](https://getbubblenow.com/)? |