mirror of
https://git.sakamoto.pl/laudom/http.sh.git
synced 2025-08-03 20:33:32 +02:00
Compare commits
3 commits
ede27f9905
...
9f123a6d66
Author | SHA1 | Date | |
---|---|---|---|
|
9f123a6d66 | ||
|
8aa0dcd2fa | ||
|
cf70f8ccc0 |
3 changed files with 12 additions and 10 deletions
12
Dockerfile
12
Dockerfile
|
@ -2,13 +2,13 @@ FROM alpine:3.21
|
|||
|
||||
RUN apk upgrade -U && apk add bash sed grep nmap-ncat socat file findutils jq curl argon2
|
||||
|
||||
WORKDIR /app
|
||||
WORKDIR /httpsh
|
||||
COPY . .
|
||||
|
||||
EXPOSE 1337
|
||||
VOLUME /app/app
|
||||
VOLUME /app/config
|
||||
VOLUME /app/storage
|
||||
VOLUME /app/secret
|
||||
VOLUME /httpsh/app
|
||||
VOLUME /httpsh/config
|
||||
VOLUME /httpsh/storage
|
||||
VOLUME /httpsh/secret
|
||||
|
||||
CMD ["/app/http.sh"]
|
||||
CMD ["/httpsh/http.sh"]
|
||||
|
|
|
@ -1,15 +1,16 @@
|
|||
#!/usr/bin/env bash
|
||||
# template.sh - basic templating engine
|
||||
_tpl_newline=$'\01'
|
||||
_tpl_ctrl=$'\02'
|
||||
|
||||
# nightmare fuel
|
||||
# render(array, template_file, recurse)
|
||||
function render() {
|
||||
local _tpl_newline=$'\01'
|
||||
local _tpl_ctrl=$'\02'
|
||||
|
||||
if [[ "$3" != true ]]; then
|
||||
local template="$(tr -d ${_tpl_newline}${_tpl_ctrl} < "$2" | sed 's/\&/<2F>UwU<77>/g')"
|
||||
local template="$(tr -d "${_tpl_newline}${_tpl_ctrl}" < "$2" | sed 's/\&/<2F>UwU<77>/g')"
|
||||
else
|
||||
local template="$(tr -d ${_tpl_ctrl} < "$2" | sed -E 's/\\/\\\\/g')"
|
||||
local template="$(tr -d "${_tpl_ctrl}" < "$2" | sed -E 's/\\/\\\\/g')"
|
||||
fi
|
||||
local buf=
|
||||
local -n ref=$1
|
||||
|
|
|
@ -5,6 +5,7 @@
|
|||
function worker_add() {
|
||||
if [[ -x "${cfg[namespace]}/workers/$1/worker.sh" ]]; then
|
||||
echo "[WRKR] adding worker $1"
|
||||
touch "${cfg[namespace]}/workers/$1/control"
|
||||
{
|
||||
shopt -s extglob
|
||||
x() { declare -p data;} # for notORM
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue