Hi,
I recently became curious about gopher, its history, the page syntax and how it all works. To satisfy curiosity I decided to get get "hands-on" with writing a gophermap and see if I could serve that page on my home network. I have a raspberrypi-400 running the 64 bit version of Debian Bookworm. I installed gophernicus with...
sudo apt-get install gophernicus
I then created the required /srv/gopher directory, placed a temporary gopher map file in /srv/gopher and then launched gophernicus with...
gophernicus -h 192.168.1.45 -o UTF-8
This worked and gophernicus now serves gopher pages on my local area network. I can view the pages using the Kristall browser on another machine. Everything seems to be working fine except I have not been able to find a way to stop gophernicus starting automatically when the pi is re-booted. So I wanted to ask, does anyone know if there is a way to start/stop gophernicus manualy?
If I understand correctly, gophernicus runs under the control of "systemctl" but I dont really understand how to make starting-stopping a manual operation. So, I began experimenting and atempted to stop gophernicus with...
sudo systemctl stop gophernicus
That failed to work but after some looking around the system I discovered gophernicus.socket and using the following terminal command...
sudo systemctl stop gophernicus.socket
I was able to stop gophernicus serving pages. Re-starting gophernicus.socket would restore service again...
sudo systemctl start gophernicus.socket
The socket service start/stop command seems to work but I wondered if there is a better way to manualy start/stop the gophernicus server?
Regards,
titanic (AKA Des)
Le 2024-09-17 à 15:35, d29602960@yahoo.co.uk a écrit :
Hi,
Hello,
I recently became curious about gopher, its history, the page syntax and how it all works. To satisfy curiosity I decided to get get "hands-on" with writing a gophermap and see if I could serve that page on my home network. I have a raspberrypi-400 running the 64 bit version of Debian Bookworm. I installed gophernicus with...
sudo apt-get install gophernicus
I then created the required /srv/gopher directory, placed a temporary gopher map file in /srv/gopher and then launched gophernicus with...
gophernicus -h 192.168.1.45 -o UTF-8
This worked and gophernicus now serves gopher pages on my local area network. I can view the pages using the Kristall browser on another machine. Everything seems to be working fine except I have not been able to find a way to stop gophernicus starting automatically when the pi is re-booted. So I wanted to ask, does anyone know if there is a way to start/stop gophernicus manualy?
If I understand correctly, gophernicus runs under the control of "systemctl" but I dont really understand how to make starting-stopping a manual operation. So, I began experimenting and atempted to stop gophernicus with...
From my understanding, gophernicus doesn't do networking so another program has to do it. I personally use inetd but systemd works fine.
sudo systemctl stop gophernicus
As you've discovered, this doesn't work because gophernicus is not running in the background like the Apache web server. Each network request is processed by systemd and then it starts gophernicus for that request and at the end of the request, gophernicus stops.
That failed to work but after some looking around the system I discovered gophernicus.socket and using the following terminal command...
sudo systemctl stop gophernicus.socket
I was able to stop gophernicus serving pages. Re-starting gophernicus.socket would restore service again...
sudo systemctl start gophernicus.socket
The socket service start/stop command seems to work but I wondered if there is a better way to manualy start/stop the gophernicus server?
From my limited understanding of systemd, using the .socket unit is the correct way to do this.
If you want to stop the service from starting at boot, you should do as written in the man page systemctl(1):
sudo systemctl disable gophernicus.socket
This will not stop gophernicus.socket, if you want to stop right now, do as you did with systemctl stop.
Regards,
titanic (AKA Des)
Best, Thomas
Hi again,
This is just a short follow-up to my own posting.
The issue has now been successfully resolved following the reciept of a PM (thanks Thomas) which explained clearly how to start/stop gophernicus and also how to prevent gophernicus starting at boot time.
Titanic.
gophernicus@lists.tildeverse.org