Import friwall role from network ansible scripts
To reuse alpine and nginx roles. Probably going to merge repos at some point.
This commit is contained in:
parent
bacfc66f7c
commit
973522c373
14 changed files with 249 additions and 1 deletions
16
roles/friwall/files/friwall.ini
Normal file
16
roles/friwall/files/friwall.ini
Normal file
|
@ -0,0 +1,16 @@
|
|||
[uwsgi]
|
||||
uid = friwall
|
||||
gid = friwall
|
||||
|
||||
socket = /run/friwall.socket
|
||||
chown-socket = friwall:nginx
|
||||
chmod-socket = 660
|
||||
|
||||
plugin = python3
|
||||
chdir = /srv/friwall/app
|
||||
mount = /=wsgi:app
|
||||
env = PYTHONUSERBASE=/srv/friwall/.local
|
||||
env = HOME=/srv/friwall
|
||||
|
||||
# Microsoft OIDC endpoint sends some fat‐ass headers.
|
||||
buffer-size = 16384
|
1
roles/friwall/files/motd
Normal file
1
roles/friwall/files/motd
Normal file
|
@ -0,0 +1 @@
|
|||
Welcome to the wall. Trespassers will be shot. Survivors will be shot again.
|
18
roles/friwall/files/pusher.initd
Executable file
18
roles/friwall/files/pusher.initd
Executable file
|
@ -0,0 +1,18 @@
|
|||
#!/sbin/openrc-run
|
||||
|
||||
command="/srv/friwall/app/$RC_SVCNAME"
|
||||
command_background="yes"
|
||||
command_user="friwall"
|
||||
command_group="nogroup"
|
||||
directory="/srv/friwall"
|
||||
pidfile="/run/$RC_SVCNAME.pid"
|
||||
|
||||
depend() {
|
||||
need net
|
||||
}
|
||||
|
||||
stop() {
|
||||
ebegin "Stopping $RC_SVCNAME"
|
||||
pkill -INT -g $(cat "$pidfile") && rm -f "$pidfile"
|
||||
eend $?
|
||||
}
|
2
roles/friwall/files/uwsgi.ini
Normal file
2
roles/friwall/files/uwsgi.ini
Normal file
|
@ -0,0 +1,2 @@
|
|||
[uwsgi]
|
||||
emperor = /etc/uwsgi/conf.d
|
Loading…
Add table
Add a link
Reference in a new issue