I would suggest that ZeroNet should come with a script to create a systemd service for ZeroNet, which would create and configure a service account for the purpose.
While trying to figure out how to do this myself, I read what somebody wrote on StackExchange:
However, service accounts are typically created and configured by the [package] manager upon installation of the service software. So, even as an administrator you should be rarely directly concerned with the creation of service accounts.
And that made me think, "Hey, ZeroNet should do that too."
Maybe this would actually be part of #241 ?
I figured out (with some help on IRC) what to do to get this working for my own case.
I happen to have my ZeroNet install living in /opt/ZeroBundle/ZeroNet
I made a file called zeronet.service
[Unit]
Description=ZeroNet: a decentralized web platform
[Service]
User=zeronet
Group=zeronet
WorkingDirectory=/opt/ZeroBundle/ZeroNet
ExecStart=/opt/ZeroBundle/Python/python /opt/ZeroBundle/ZeroNet/zeronet.py
Restart=on-failure
[Install]
WantedBy=default.target
I ran these commands (or something close)
sudo mv zeronet.service /etc/systemd/system/zeronet.service
sudo adduser zeronet
sudo chown zeronet:zeronet -R /opt/ZeroBundle
sudo systemctl enable zeronet.service
sudo systemctl start zeronet.service
sudo systemctl status zeronet.service
If the status indicates that you're running then you should be good.
I still think having this in a script that's distributed with the source code would be nice.
I would suggest that ZeroNet should come with a script to create a systemd service for ZeroNet, which would create and configure a service account for the purpose.
While trying to figure out how to do this myself, I read what somebody wrote on StackExchange:
However, service accounts are typically created and configured by the [package] manager upon installation of the service software. So, even as an administrator you should be rarely directly concerned with the creation of service accounts.
And that made me think, "Hey, ZeroNet should do that too."
yes please
Most helpful comment
Maybe this would actually be part of #241 ?