Skip to content

Commit

Permalink
Get a lot of this working with no NGinX
Browse files Browse the repository at this point in the history
  • Loading branch information
noahgibbs committed Nov 11, 2020
1 parent f67447f commit b8a2b96
Show file tree
Hide file tree
Showing 6 changed files with 5 additions and 31 deletions.
13 changes: 0 additions & 13 deletions dev_scripts/mac_setup.sh
Expand Up @@ -41,7 +41,6 @@ fi
which brew || /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"
which git || brew install git
which npm || brew install npm
which nginx || brew install nginx

if [ -f ~/.ssh/id_rsa.pub ]
then
Expand Down Expand Up @@ -106,18 +105,6 @@ pushd websocket-to-tcp-tunnel
npm install
popd

echo "Copying Orchil config file..."
cp dev_scripts/orchil_profiles.js orchil/profiles.js

echo "NGinX configuration..."
# TODO: don't blindly copy and modify this every time
NG_CONF=/usr/local/etc/nginx/servers/skotos_dev_nginx.conf
mkdir -p /usr/local/etc/nginx/servers/
sed "s:%SKOTOS_ROOT_LOCATION%:${SKOTOS_ROOT}/orchil:" <dev_scripts/dev_nginx.conf >$NG_CONF

echo "Testing that NGinX config will load... (enter admin password if needed by sudo)"
sudo nginx -t

./dev_scripts/start_server.sh

#cat dev_scripts/post_install_instructions.txt
4 changes: 2 additions & 2 deletions dev_scripts/post_install_instructions.txt
Expand Up @@ -4,7 +4,7 @@ To log in as a developer: telnet localhost 10098

To create a new chat character: point your browser at http://localhost:10080/SAM/Prop/Theatre:Web:Theatre/Index

To log in directly when you already have a character: point your web browser at http://localhost:10900/gables/gables.htm?charName=ignored
To log in directly when you already have a character: point your web browser at http://localhost:10090/gables/gables.htm?charName=ignored

By default, the setup script gave you an admin user with password "adminpwd" and a user named "bobo" with password "bobopwd". You can change these...

Expand All @@ -19,6 +19,6 @@ In some terminal programs, this script just opened a bunch of terminal tabs like
### Untested and Upcoming

SkotOS's builder interface:
http://localhost:10900/gables/TreeOfWoe.html
http://localhost:10090/gables/TreeOfWoe.html

=========================================
12 changes: 0 additions & 12 deletions dev_scripts/start_server.sh
Expand Up @@ -41,18 +41,6 @@ else
echo "Relay is already running for port 10802->10090"
fi

# Run NGinX to forward to websocket relays

NG_PID=$(ps aux | grep "nginx: master process" | grep -v grep | cut -c 14-22)

if [ -z "$NG_PID" ]
then
sudo nginx
else
echo "NGinX is already running... Reloading config."
sudo nginx -s reload
fi

cat dev_scripts/post_install_instructions.txt

if [ -f skotos.database ]
Expand Down
2 changes: 0 additions & 2 deletions dev_scripts/stop_server.sh
@@ -1,7 +1,5 @@
#!/bin/bash

# TODO: Do we stop NGinX? Interesting question.

DGD_PID=$(ps aux | grep "dgd ./skotos.dgd" | grep -v grep | cut -c 14-22)
if [ -z "$DGD_PID" ]
then
Expand Down
2 changes: 1 addition & 1 deletion skoot/data/vault/Theatre/Web/Theatre.xml
Expand Up @@ -90,7 +90,7 @@
\<font size="-2"\>\<br/\>\</font\>
\{? \| \$(Theatre.Chatter) \|
\<a href="Edit"\>Edit My Character\</a\> \\\|
\{? \| \$(UDat.Host) \| \<a href="http://localhost:10900/gables/gables.htm?charName=ignored"\>Play\</a\> \\\| \<zealotry src="woe:jon"\>\<a target="_top" href="/Dev/MacOfWoe.sam"\>Tree of Woe\</a\>\</zealotry\> \|\}
\{? \| \$(UDat.Host) \| \<a href="http://localhost:10090/gables/gables.htm?charName=ignored"\>Play\</a\> \\\| \<zealotry src="woe:jon"\>\<a target="_top" href="/Dev/MacOfWoe.sam"\>Tree of Woe\</a\>\</zealotry\> \|\}
\|
\<zform\>
\<action\>
Expand Down
3 changes: 2 additions & 1 deletion skoot/usr/Gables/data/www/profiles.js
Expand Up @@ -5,7 +5,8 @@ var profiles = {
"method": "websocket",
"protocol": "ws",
"server": "localhost", //"chat.gables.chattheatre.com",
"port": 10800,
"http_port": 10090,
"port": 10801,
"woe_port": 10802,
"path": "/gables",
"extra": "",
Expand Down

0 comments on commit b8a2b96

Please sign in to comment.