diff --git a/README.md b/README.md index 8850598..6af75d6 100644 --- a/README.md +++ b/README.md @@ -37,22 +37,22 @@ ## Setting up the web server on your wii 9. Install nginx, sudo, and git using **`pacman -S nginx sudo git`** -10. Create a new non-root user with **`useradd --create-home [your username]`** -11. Set a password for your user with **`passwd [your username]`** +10. Create a new non-root user with **`useradd --create-home {your username}`** +11. Set a password for your user with **`passwd {your username}`** 12. Run the command **`echo '%wheel ALL=(ALL:ALL) ALL' > /etc/sudoers.d/wheel`** to enable give sudo access to all users in the wheel group -13. Run the command **`usermod -aG wheel [your username]`** to add your user to the wheel group +13. Run the command **`usermod -aG wheel {your username}`** to add your user to the wheel group 14. Enable the ssh server systemd service with the command **`systemctl enable --now sshd`**. It should now start automatically upon boot. -15. From your primary linux machine, run **`ssh-copy-id -i [your ssh key] [your linux wii's username]@[your linux wii's IP address]`** and enter the password you set in step 11 - - **`[your ssh key]`** is your ssh identity file, likely found in **`~/.ssh/`**, ending in **`.pub`** - - **`[your linux wii's username]`** is the username you set in step 10 - - **`[your linux wii's IP address]`** is the network address of your wii. You can find this by entering the command **`ip address show | grep "inet "`** +15. From your primary linux machine, run **`ssh-copy-id -i {your ssh key} {your linux wii's username}@{your linux wii's IP address}`** and enter the password you set in step 11 + - **`{your ssh key}`** is your ssh identity file, likely found in **`~/.ssh/`**, ending in **`.pub`** + - **`{your linux wii's username}`** is the username you set in step 10 + - **`{your linux wii's IP address}`** is the network address of your wii. You can find this by entering the command **`ip address show | grep "inet "`** - The address will probably look something like **`192.168.1.130`**. It will not be the one starting with **`127`** nor will it be the one ending with **`255`** -16. Attempt to log in over ssh from your primary linux machine using the command **`ssh [your linux wii's username]@[your linux wii's IP address]`** +16. Attempt to log in over ssh from your primary linux machine using the command **`ssh {your linux wii's username}@{your linux wii's IP address}`** 17. Once connected to a shell over ssh, run **`sudo whoami`** and enter your user password when prompted - If the output after entering your passwrd is **`root`** then your user has successfully been given sudo priveleges - you may now log the wii's **`root`** user out of any active shells 18. Enable the nginx server systemd service with the command **`systemctl enable --now nginx`**. It should now start automatically upon boot. -19. Navigate to **`http://[your linux wii's IP address]`** in a web browser on a device connected to the same network as the Wii. You should be greeted with the nginx splash page. +19. Navigate to **`http://{your linux wii's IP address}`** in a web browser on a device connected to the same network as the Wii. You should be greeted with the nginx splash page. 20. Open the nginx config with **`sudo nano /etc/nginx/nginx.conf`**. In the **`http`** block, locate the first **`server`** block, and change **`/usr/share/nginx/html`** to **`/usr/local/share/nginx/html`** 21. Press ctrl+x to close the file, press y to confirm saving changes, then press enter to confirm the filename 22. Run the command **`sudo mkdir -p /usr/local/share/nginx/html`** to create the local nginx resource directory diff --git a/update-readme.sh b/update-readme.sh index 280909e..a2683cb 100755 --- a/update-readme.sh +++ b/update-readme.sh @@ -3,4 +3,6 @@ #this script generates an ansi-encoded readme.txt which can be printed to the terminal so style encodings are preserved without needing to rerun the below script for every page update #sudo mkdir -p /etc/wii-server -script -qc '~/venv/bin/rich README.md 2> /dev/null' | unbuffer -p cat | tee readme.txt +sed -e 's/\*\*`/[r]/g' README.md | tee README2.md +sed -i 's|`\*\*|[/r]|g' README2.md +script -qc 'cat README2.md | ~/venv/bin/rich - --print 2> /dev/null' | unbuffer -p cat | tee readme.txt