pipes -> shlex

This commit is contained in:
cronekorkn 2024-10-09 12:50:18 +02:00
parent 01bcfd8638
commit a3ba06bcb0
Signed by: cronekorkn
SSH key fingerprint: SHA256:v0410ZKfuO1QHdgKBsdQNF64xmTxOF8osF1LIqwTcVw
4 changed files with 18 additions and 15 deletions

View file

@ -1,6 +1,6 @@
pid /var/run/nginx.pid; pid /var/run/nginx.pid;
user www-data; user www-data;
worker_processes 10; worker_processes ${worker_processes};
% for module in sorted(modules): % for module in sorted(modules):
load_module modules/ngx_${module}_module.so; load_module modules/ngx_${module}_module.so;
@ -22,6 +22,8 @@ http {
tcp_nopush on; tcp_nopush on;
client_max_body_size 32G; client_max_body_size 32G;
ssl_dhparam "/etc/ssl/certs/dhparam.pem"; ssl_dhparam "/etc/ssl/certs/dhparam.pem";
# dont show nginx version
server_tokens off;
% if node.has_bundle('php'): % if node.has_bundle('php'):
upstream php-handler { upstream php-handler {

View file

@ -32,6 +32,7 @@ files = {
'content_type': 'mako', 'content_type': 'mako',
'context': { 'context': {
'modules': node.metadata.get('nginx/modules'), 'modules': node.metadata.get('nginx/modules'),
'worker_processes': node.metadata.get('vm/cores'),
}, },
'triggers': { 'triggers': {
'svc_systemd:nginx:restart', 'svc_systemd:nginx:restart',

View file

@ -3,7 +3,7 @@ from bundlewrap.exceptions import BundleError
from bundlewrap.utils.text import force_text, mark_for_translation as _ from bundlewrap.utils.text import force_text, mark_for_translation as _
from bundlewrap.utils.remote import PathInfo from bundlewrap.utils.remote import PathInfo
import types import types
from pipes import quote from shlex import quote
# Downloaded from https://github.com/bundlewrap/plugins/blob/master/item_download/items/download.py # Downloaded from https://github.com/bundlewrap/plugins/blob/master/item_download/items/download.py
# No, we can't use plugins here, because bw4 won't support them anymore. # No, we can't use plugins here, because bw4 won't support them anymore.

View file

@ -43,17 +43,17 @@
'dhcp_server': True, 'dhcp_server': True,
}, },
}, },
'nftables': { # 'nftables': {
'forward': { # 'forward': {
# Drop DHCP client requests (UDP port 68) # # Drop DHCP client requests (UDP port 68)
'udp sport 68 drop', # 'udp sport 68 drop',
'udp dport 68 drop', # 'udp dport 68 drop',
# Drop DHCP server responses (UDP port 67) # # Drop DHCP server responses (UDP port 67)
'udp sport 67 drop', # 'udp sport 67 drop',
'udp dport 67 drop', # 'udp dport 67 drop',
}, # },
}, # },
'sysctl': { 'sysctl': {
'net': { 'net': {
'ipv4': { 'ipv4': {