You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In systemd you can create socket units so that the service is activated the moment it receives a connection. This way it is not necessary for the service to be up all the time.
An example of the unit could be this one:
rustic-server.service
[Unit]
Description=A REST server built in rust to use with rustic and restic
Documentation=https://rustic.cli.rs/ecosystem/rustic-server/
Wants=network-online.target
After=network-online.target
[Service]
Type=simple
User=rustic-server
Group=rustic-server
EnvironmentFile=/etc/rustic-server/rustic-server.conf
ExecStart=/usr/bin/rustic-server -p $RUSTIC_SERVER_PATH $RUSTIC_SERVER_OPTS
Restart=always
[Install]
WantedBy=multi-user.target
rustic-server.socket
[Unit]
Description=A REST server built in rust to use with rustic and restic
[Socket]
ListenStream=8000
[Install]
WantedBy=sockets.target
In systemd you can create socket units so that the service is activated the moment it receives a connection. This way it is not necessary for the service to be up all the time.
An example of the unit could be this one:
rustic-server.service
rustic-server.socket
The problem is that for this to work rustic-server must support it. As far as I see in rest-server they made a modification for it, I suppose that something similar can be done here.
The text was updated successfully, but these errors were encountered: