add config for systemd
This commit is contained in:
parent
a5e75b3dca
commit
14f1c5addc
|
@ -1,4 +1,4 @@
|
|||
sqlite_db = "subscribe-list.db"
|
||||
sqlite_db = "/var/local/lib/subscribe-list.db"
|
||||
server_base_url = "https://my-site/"
|
||||
|
||||
[oidc.google]
|
||||
|
|
14
subscribe-list.service
Normal file
14
subscribe-list.service
Normal file
|
@ -0,0 +1,14 @@
|
|||
[Unit]
|
||||
Description=web server for managing subscriptions
|
||||
Requires=subscribe-list.socket
|
||||
|
||||
[Service]
|
||||
Environment=RUST_LOG=info
|
||||
Type=exec
|
||||
ExecStart=!sh -c 'mkdir -p /var/local/lib; umask 007; touch /var/local/lib/subscribe-list.db; chown www-data:www-data /var/local/lib/subscribe-list.db'
|
||||
ExecStart=/usr/local/bin/subscribe-list --config /etc/subscribe-list/config.toml serve --listen-fd
|
||||
User=www-data
|
||||
Group=www-data
|
||||
|
||||
[Install]
|
||||
Also=subscribe-list.socket
|
11
subscribe-list.socket
Normal file
11
subscribe-list.socket
Normal file
|
@ -0,0 +1,11 @@
|
|||
[Unit]
|
||||
Description=subscribe-list socket
|
||||
|
||||
[Socket]
|
||||
ListenStream=/run/subscribe-list.socket
|
||||
SocketMode=0660
|
||||
SocketUser=www-data
|
||||
SocketGroup=www-data
|
||||
|
||||
[Install]
|
||||
WantedBy=sockets.target
|
Loading…
Reference in a new issue