diff options
| author | Emil Williams | 2025-08-21 01:01:39 +0000 |
|---|---|---|
| committer | Emil Williams | 2025-08-21 01:01:39 +0000 |
| commit | d72f41647a08d0940b2c69ca0ab9f975fd773b5b (patch) | |
| tree | 910e88dc5101c6541c3d1404823d94133884c233 | |
| parent | 658f9c0c0fcce6a6371fbdaf8f74a5ca4265c9a9 (diff) | |
| download | gorillanest-d72f41647a08d0940b2c69ca0ab9f975fd773b5b.tar.xz gorillanest-d72f41647a08d0940b2c69ca0ab9f975fd773b5b.tar.zst | |
Hide Everything, Hyde!
| -rw-r--r-- | Makefile | 10 | ||||
| -rw-r--r-- | README | 13 | ||||
| -rwxr-xr-x | gorillanest | 22 | ||||
| -rwxr-xr-x | perl/cgi.pl (renamed from gorillanest.pl.cgi) | 2 | ||||
| -rwxr-xr-x | perl/fcgi.pl (renamed from gorillanest.pl.fcgi) | 4 | ||||
| -rw-r--r-- | service/lighttpd-cgi.conf | 4 | ||||
| -rw-r--r-- | service/lighttpd-fcgi.conf | 2 |
7 files changed, 49 insertions, 8 deletions
@@ -1,2 +1,10 @@ -serve-dev: +serve-dev lighttpd-cgi: lighttpd -D -f ./service/lighttpd-cgi.conf + +lighttpd-fcgi: + lighttpd -D -f ./service/lighttpd-fcgi.conf + +cgi fcgi: + ./gorillanest -$@ + +run: fcgi @@ -57,4 +57,15 @@ Gitea broke so I had a low wage hungarian programmer write this. Everything runs from this directory via './gorillanest'. -gorillanest will provide GIT & HTTP access for all repos in /public/ unconditionally, and /private/ for authorized connections. +--- + +./git -- Root (~$user/$repository) +./marketing -- Useless Trash +./perl -- Perl Source +./service -- lighttpd, nginx, and other service files +./static -- Static Served Files +./template -- Perl Templates +./config.default.pl -- default configuration, don't edit this, copy it to ./config.pl +./config.pl -- (nonexistant) configuration overrides against ./config.default.pl +./gorillanest -- Runscript +./Makefile -- Anon's autism for starting webserver diff --git a/gorillanest b/gorillanest new file mode 100755 index 0000000..5873153 --- /dev/null +++ b/gorillanest @@ -0,0 +1,22 @@ +#!/bin/sh + +cd "$(dirname "$(readlink -f "$0")")" + +CGI='./perl/cgi.pl' +FCGI='./perl/fcgi.pl' + +run=$FCGI + +while [ ! -z $1 ]; do + if [ $1 = '-cgi' ]; then + run=$CGI + elif [ $1 = '-fcgi' ]; then + run=$FCGI + else break; fi + shift +done + +$run $@ + +# I'm a fan for linguistic redundancy in software +# This is technically a mental disorder diff --git a/gorillanest.pl.cgi b/perl/cgi.pl index cebe11b..3cbed42 100755 --- a/gorillanest.pl.cgi +++ b/perl/cgi.pl @@ -20,7 +20,7 @@ use Cwd; use Data::Dumper; use Git::Repository; -use lib '.'; +use lib qw(. ..); BEGIN { require 'config.default.pl'; } BEGIN { require 'config.pl'; } diff --git a/gorillanest.pl.fcgi b/perl/fcgi.pl index afba9be..0f3dff8 100755 --- a/gorillanest.pl.fcgi +++ b/perl/fcgi.pl @@ -6,8 +6,8 @@ use warnings; use Syntax::Keyword::Try; use FCGI; -use lib '.'; -BEGIN { require 'gorillanest.pl.cgi'; } +use lib qw(perl); +BEGIN { require 'cgi.pl'; } while (1) { try { diff --git a/service/lighttpd-cgi.conf b/service/lighttpd-cgi.conf index 24df494..6dd7d76 100644 --- a/service/lighttpd-cgi.conf +++ b/service/lighttpd-cgi.conf @@ -8,7 +8,7 @@ server.document-root = var.CWD server.port = 5050 url.rewrite-once = ( - "/" => "/gorillanest.pl.cgi" + "/" => "/perl/cgi.pl" ) setenv.add-environment = ( @@ -16,5 +16,5 @@ setenv.add-environment = ( ) cgi.assign = ( - ".pl.cgi" => "/usr/bin/perl" + ".pl" => "/usr/bin/perl" ) diff --git a/service/lighttpd-fcgi.conf b/service/lighttpd-fcgi.conf index a9cbb25..c5b9fba 100644 --- a/service/lighttpd-fcgi.conf +++ b/service/lighttpd-fcgi.conf @@ -17,7 +17,7 @@ setenv.add-environment = ( fastcgi.server = ( "/gorillanest" => (( - "bin-path" => "gorillanest.pl.fcgi", + "bin-path" => "perl/fcgi.pl", "socket" => "gorillanest.sock", )) ) |
