diff --git a/.gitignore b/.gitignore index 37ab0db..1521c8b 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1 @@ -fuzzies.log -ultimate-email -newusers.dat -/table.* -userlist -bannedusers.php +dist diff --git a/_webmention.html b/_webmention.html deleted file mode 100644 index ced3288..0000000 --- a/_webmention.html +++ /dev/null @@ -1,2 +0,0 @@ - - diff --git a/helloworld.c b/assets/helloworld.c similarity index 100% rename from helloworld.c rename to assets/helloworld.c diff --git a/helloworld.cgi b/assets/helloworld.cgi similarity index 100% rename from helloworld.cgi rename to assets/helloworld.cgi diff --git a/icon.png b/assets/icon.png similarity index 100% rename from icon.png rename to assets/icon.png diff --git a/kcgi-starter.tar.gz b/assets/kcgi-starter.tar.gz similarity index 100% rename from kcgi-starter.tar.gz rename to assets/kcgi-starter.tar.gz diff --git a/tilde.css b/assets/tilde.css similarity index 100% rename from tilde.css rename to assets/tilde.css diff --git a/build.sh b/build.sh new file mode 100755 index 0000000..841ba8f --- /dev/null +++ b/build.sh @@ -0,0 +1,63 @@ +#!/bin/sh + +set -e + +build() +{ + printf '\n%s\n' 'Starting build ...' + mkdir -p dist + + for FILE in html/*; do + FILENAME=$(basename "$FILE") + printf '\n%s %s\n' 'Building:' "$FILENAME" + + if [ "$FILENAME" != 'index.html' ]; then + sed '/{{HEADER}}/r inc/_header.html' "$FILE" | sed '/{{HEADER}}/D' | sed '/{{LOGONAV}}/r inc/_logonav.html' | sed '/{{LOGONAV}}/D' > "dist/$FILENAME" + else + sed '/{{HEADER}}/r inc/_header.html' "$FILE" | sed '/{{HEADER}}/D' | sed '/{{LOGONAV}}/r inc/_logonav.html' | sed '/{{LOGONAV}}/D' | sed '/{{NEWS}}/r inc/_news.html' | sed '/{{NEWS}}/D' > "dist/$FILENAME" + fi + done + + cp assets/* dist/ + printf '%s\n\n' 'Done!' +} + +installation() +{ + if [ ! -d dist ]; then + printf '\n%s\n\n' 'Please build first: ./build.sh' + exit 1 + fi + + INSTDIR=/var/www/htdocs + + printf '\n%s %s\n' 'Installing to' "$INSTDIR" + + for FILE in dist/*; do + FILENAME=$(basename "$FILE") + EXT=$(echo "$FILENAME" | cut -d'.' -f2) + + if [ "$EXT" = 'php' ] || [ "$EXT" = 'cgi' ]; then + install -m755 "$FILE" "$INSTDIR/$FILENAME" + else + install -m644 "$FILE" "$INSTDIR/$FILENAME" + fi + done + + printf '%s\n\n' 'Done!' +} + +clean() +{ + printf '\n%s\n\n' 'Cleaning ...' + rm -rf dist +} + +case "$1" in + install) + installation; exit ;; + clean) + clean; exit ;; + *) + build +esac \ No newline at end of file diff --git a/icon-large.png b/extra/icon-large.png similarity index 100% rename from icon-large.png rename to extra/icon-large.png diff --git a/icon.xcf b/extra/icon.xcf similarity index 100% rename from icon.xcf rename to extra/icon.xcf diff --git a/faq.php b/faq.php deleted file mode 100755 index c7bc5f1..0000000 --- a/faq.php +++ /dev/null @@ -1,61 +0,0 @@ - - - - - - - tilde.institute :: FAQ - - - - - - -
- -
-

FAQ

- -

How do I change my interactive shell?

-

Once you've logged in, check the path for your desired shell with

-
$ which fish
-

Replacing fish with the the shell you want. In this case, the path will be /usr/local/bin/fish - Now, run:

-
$ EDITOR=nano chsh
-

Change the Shell line to read:

-
Shell: /usr/local/bin/fish
-

Save and exit. You'll need to log out then back in.

- -

How do I change the index page of my site?

-

Because of the way httpd(8) is set up, you'll need to ask in #institute or send an email to admins@tilde.institute

- -

Can you install this package for me?

-

As long as it's in the OpenBSD ports tree, and doesn't facilitate any potentially malicious behavior (like nmap), - then it's probably not a big deal. Either hop on IRC and ask in #institute or send an email to admins@tilde.institute

- -

How do I authenticate with SMTP remotely?

-

Only local access to SMTP is allowed. However, you can use an SSH tunnel on your machine to send mail.

-
ssh -nNTL 25:localhost:25 tilde.institute
-

You won't need to supply a username or password when sending mail via localhost:25 this way, since you're already authenticated via SSH.

- -

Can you whitelist a port for me in the firewall?

-

Sorry, but this presents too much of a security risk on a public-access system.

- -

Are user services allowed?

-

Generally, yes. If you're running something that's using a ton of resources or in some way affecting other users or the general use of the system, - then we'll kill it. Just be aware of what you're running and how it may affect the system and other users.

- -

Are IRC bots allowed?

-

Yes, though there are restrictions on their use on the tilde.chat IRC network. They should not reside in #meta, instead keep - them in a private channel or in #bots. Bots must also conform to the bot guidelines listed here.

-

Don't run eggdrop from tilde.institute. There are legitimate uses for eggdrop, but separating the people with some kind - of legitimate use from malicious users is tiring. So, no eggdrop.

-
-
-
-
- - - diff --git a/coc.php b/html/coc.html old mode 100755 new mode 100644 similarity index 93% rename from coc.php rename to html/coc.html index afd8496..63c1b01 --- a/coc.php +++ b/html/coc.html @@ -1,20 +1,14 @@ - + - - tilde.institute :: Code of Conduct - - - + {{HEADER}}
- + {{LOGONAV}}

tilde.institute code of conduct

tl;dr: Be kind to each other. Think carefully about the words you @@ -118,4 +112,4 @@

- + \ No newline at end of file diff --git a/html/faq.html b/html/faq.html new file mode 100644 index 0000000..436504d --- /dev/null +++ b/html/faq.html @@ -0,0 +1,67 @@ + + + + + tilde.institute :: FAQ + {{HEADER}} + + + +
+ {{LOGONAV}} +
+

FAQ

+ +

How do I change my interactive shell?

+

Once you've logged in, check the path for your desired shell with

+
$ which fish
+

Replacing fish with the the shell you want. In this case, the path will be + /usr/local/bin/fish + Now, run:

+
$ EDITOR=nano chsh
+

Change the Shell line to read:

+
Shell: /usr/local/bin/fish
+

Save and exit. You'll need to log out then back in.

+ +

How do I change the index page of my site?

+

Because of the way httpd(8) is set up, you'll need to ask in #institute or send + an email to admins@tilde.institute

+ +

Can you install this package for me?

+

As long as it's in the OpenBSD ports tree, and doesn't facilitate any potentially malicious behavior + (like nmap), + then it's probably not a big deal. Either hop on IRC and ask in #institute or send an email + to admins@tilde.institute

+ +

How do I authenticate with SMTP remotely?

+

Only local access to SMTP is allowed. However, you can use an SSH tunnel on your machine to send mail. +

+
ssh -nNTL 25:localhost:25 tilde.institute
+

You won't need to supply a username or password when sending mail via localhost:25 this way, + since you're already authenticated via SSH.

+ +

Can you whitelist a port for me in the firewall?

+

Sorry, but this presents too much of a security risk on a public-access system.

+ +

Are user services allowed?

+

Generally, yes. If you're running something that's using a ton of resources or in some way affecting + other users or the general use of the system, + then we'll kill it. Just be aware of what you're running and how it may affect the system and other + users.

+ +

Are IRC bots allowed?

+

Yes, though there are restrictions on their use on the tilde.chat IRC network. They should + not reside in #meta, instead keep + them in a private channel or in #bots. Bots must also conform to the bot guidelines listed + here.

+

Don't run eggdrop from tilde.institute. There are legitimate uses for eggdrop, + but separating the people with some kind + of legitimate use from malicious users is tiring. So, no eggdrop.

+
+
+
+
+ + + \ No newline at end of file diff --git a/index.php b/html/index.html old mode 100755 new mode 100644 similarity index 93% rename from index.php rename to html/index.html index e0ce20e..b37ed4e --- a/index.php +++ b/html/index.html @@ -4,18 +4,13 @@ - - tilde.institute :: Public-access OpenBSD system - - - - + {{HEADER}}
- + {{LOGONAV}}

Welcome to tilde.institute, a public-access UNIX system running OpenBSD. This is a space for people to explore the OpenBSD operating system, in addition to exploring the more social @@ -122,7 +117,7 @@

- + {{NEWS}}
diff --git a/html/signup.html b/html/signup.html
new file mode 100644
index 0000000..482a4ba
--- /dev/null
+++ b/html/signup.html
@@ -0,0 +1,35 @@
+
+
+
+
+    tilde.institute :: Sign Up
+    {{HEADER}}
+
+
+
+    
+ {{LOGONAV}} + +
+ + + \ No newline at end of file diff --git a/stats.php b/html/stats.php similarity index 70% rename from stats.php rename to html/stats.php index 4109048..3ed3a27 100755 --- a/stats.php +++ b/html/stats.php @@ -3,16 +3,12 @@ "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> - - tilde.institute :: Stats - - - + {{HEADER}}
- + {{LOGONAV}}

diff --git a/submit.php b/html/submit.php similarity index 91% rename from submit.php rename to html/submit.php index fe76f51..1b297e8 100755 --- a/submit.php +++ b/html/submit.php @@ -3,15 +3,12 @@ "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> - - - tilde.institute :: Sign Up - - + tilde.institute :: Sign Up + {{HEADER}}
- + {{LOGONAV}}
+ + + + + + \ No newline at end of file diff --git a/_header.html b/inc/_logonav.html similarity index 100% rename from _header.html rename to inc/_logonav.html diff --git a/_newsdata.html b/inc/_news.html similarity index 100% rename from _newsdata.html rename to inc/_news.html diff --git a/signup.php b/signup.php deleted file mode 100755 index 0f8da66..0000000 --- a/signup.php +++ /dev/null @@ -1,41 +0,0 @@ - - - - - - - tilde.institute :: Sign Up - - - - - - -
- - -
- - - diff --git a/tilde.json b/tilde.json deleted file mode 100644 index b0f27f7..0000000 --- a/tilde.json +++ /dev/null @@ -1 +0,0 @@ -{"name":"tilde.institute","url":"https://tilde.institute","signup_url":"https://tilde.institute/signup","user_count":276,"want_users":true,"admin_email":"admins@tilde.institute","description":"A public-access machine where users can explore the OpenBSD operating system.","last_generated":"Tue, 30 Jun 2020 03:00:02 +0000"} \ No newline at end of file