Add various support bits for running openbsd.app
This commit is contained in:
parent
6a87ae39df
commit
1d725c62d2
4
support/cron
Normal file
4
support/cron
Normal file
@ -0,0 +1,4 @@
|
||||
SHELL=/bin/sh
|
||||
PATH=/sbin:/usr/sbin:/bin:/usr/bin:/usr/X11R6/bin:/usr/local/sbin:/usr/local/bin
|
||||
|
||||
0 0 * * * app -n /home/app/openbsd.app/upgrade.sh && /etc/rc.d/openbsd_app restart
|
21
support/pf.conf
Normal file
21
support/pf.conf
Normal file
@ -0,0 +1,21 @@
|
||||
# $OpenBSD: pf.conf,v 1.55 2017/12/03 20:40:04 sthen Exp $
|
||||
#
|
||||
# See pf.conf(5) and /etc/examples/pf.conf
|
||||
|
||||
set skip on lo
|
||||
|
||||
block return # block stateless traffic
|
||||
pass # establish keep-state
|
||||
|
||||
# By default, do not permit remote connections to X11
|
||||
block return in on ! lo0 proto tcp to port 6000:6010
|
||||
|
||||
# Port build user does not need network
|
||||
block return out log proto {tcp udp} user _pbuild
|
||||
|
||||
block return in on ! lo0 proto tcp to port { 3000, 8080, 4343 }
|
||||
|
||||
pass in on egress inet proto tcp from any to (egress) port 80 rdr-to 127.0.0.1 port 8080
|
||||
pass in on egress inet proto tcp from any to (egress) port 443 rdr-to 127.0.0.1 port 4343
|
||||
pass in on egress inet6 proto tcp from any to (egress) port 80 rdr-to ::1 port 8080
|
||||
pass in on egress inet6 proto tcp from any to (egress) port 443 rdr-to ::1 port 4343
|
13
support/rc.d/domain
Executable file
13
support/rc.d/domain
Executable file
@ -0,0 +1,13 @@
|
||||
#!/bin/ksh
|
||||
|
||||
# /home/app/go/bin/domain openbsd.app -acme :8080 -tlsproxy 127.0.0.1:4343=127.0.0.1:3000
|
||||
|
||||
daemon="/home/app/go/bin/domain"
|
||||
daemon_flags="openbsd.app -acme :8080 -tlsproxy 127.0.0.1:4343=:3000,[::1]:4343=[::1]:3000 -cache /home/app/.cache"
|
||||
daemon_execdir="/home/app/"
|
||||
daemon_user="app"
|
||||
|
||||
. /etc/rc.d/rc.subr
|
||||
|
||||
rc_bg=YES
|
||||
rc_cmd $1
|
15
support/rc.d/openbsd_app
Executable file
15
support/rc.d/openbsd_app
Executable file
@ -0,0 +1,15 @@
|
||||
#!/bin/ksh
|
||||
|
||||
daemon="/usr/local/bin/morbo"
|
||||
daemon_flags="-m production -l http://[::1]:3000 -l http://127.0.0.1:3000 openbsd.app.pl"
|
||||
#daemon="/home/app/openbsd.app/openbsd.app.pl"
|
||||
#daemon_flags="daemon"
|
||||
daemon_execdir="/home/app/openbsd.app"
|
||||
daemon_user="app"
|
||||
|
||||
. /etc/rc.d/rc.subr
|
||||
|
||||
pexp="perl: openbsd.app.pl"
|
||||
|
||||
rc_bg=YES
|
||||
rc_cmd $1
|
@ -50,10 +50,10 @@ SQL=$(cat <<EOF
|
||||
EOF
|
||||
)
|
||||
|
||||
rm -f combined.db
|
||||
rm -f ~/openbsd.app/combined.db
|
||||
printf "$SQL\n" ${CURRENT_FILE} \
|
||||
"current_ports_fts" \
|
||||
"current_ports_fts" | sqlite3 combined.db
|
||||
"current_ports_fts" | sqlite3 ~/openbsd.app/combined.db
|
||||
printf "$SQL\n" ${STABLE_FILE} \
|
||||
"stable_ports_fts" \
|
||||
"stable_ports_fts" | sqlite3 combined.db
|
||||
"stable_ports_fts" | sqlite3 ~/openbsd.app/combined.db
|
||||
|
Loading…
Reference in New Issue
Block a user