diff options
Diffstat (limited to 'ergo/templates')
| -rw-r--r-- | ergo/templates/config.yaml.j2 | 6 | ||||
| -rw-r--r-- | ergo/templates/ergo.service.j2 | 20 | ||||
| -rw-r--r-- | ergo/templates/nginx.conf.j2 | 2 |
3 files changed, 24 insertions, 4 deletions
diff --git a/ergo/templates/config.yaml.j2 b/ergo/templates/config.yaml.j2 index a0c3249..c2e22a8 100644 --- a/ergo/templates/config.yaml.j2 +++ b/ergo/templates/config.yaml.j2 @@ -58,7 +58,7 @@ server: # proxy: false # Example of a Unix domain socket for proxying: - "/var/ergo/socket": + "{{ergo_run_dir}}/socket": # Example of a Tor listener: any connection that comes in on this listener will # be considered a Tor connection. It is strongly recommended that this listener @@ -288,7 +288,7 @@ server: # ergo will write files to disk under certain circumstances, e.g., # CPU profiling or data export. by default, these files will be written # to the working directory. set this to customize: - output-path: "/var/ergo" + output-path: "{{ergo_run_dir}}" # account options accounts: @@ -685,7 +685,7 @@ debug: # datastore configuration datastore: # path to the datastore - path: "/var/ergo/ergo.db" + path: "{{ergo_data_dir}}/ergo.db" # if the database schema requires an upgrade, `autoupgrade` will attempt to # perform it automatically on startup. the database will be backed diff --git a/ergo/templates/ergo.service.j2 b/ergo/templates/ergo.service.j2 new file mode 100644 index 0000000..a885a3d --- /dev/null +++ b/ergo/templates/ergo.service.j2 @@ -0,0 +1,20 @@ +[Unit] +Description=ergo +#After=network.target +# If you are using MySQL for history storage, comment out the above line +# and uncomment these two instead (you must independently install and configure +# MySQL for your system): +Wants=mysql.service +After=network.target mysql.service + +[Service] +Type=simple +User=ergo +WorkingDirectory={{ergo_run_dir}} +ExecStart=/usr/local/bin/ergo run --conf /etc/ergo/config.yaml +ExecReload=/bin/kill -HUP $MAINPID +Restart=on-failure +LimitNOFILE=1048576 + +[Install] +WantedBy=multi-user.target diff --git a/ergo/templates/nginx.conf.j2 b/ergo/templates/nginx.conf.j2 index 1b1a83b..b6c9354 100644 --- a/ergo/templates/nginx.conf.j2 +++ b/ergo/templates/nginx.conf.j2 @@ -1,6 +1,6 @@ server { listen 6697 ssl; - proxy_pass unix:/var/ergo/socket; + proxy_pass unix:{{ergo_run_dir}}/socket; proxy_protocol on; ssl_certificate {{nginx_ssl_cert}}; |
