diff --git a/debian/sysconfig/thalos-server b/debian/sysconfig/thalos-server new file mode 100644 index 0000000..6afed36 --- /dev/null +++ b/debian/sysconfig/thalos-server @@ -0,0 +1,6 @@ +# Environment variables for thalos-server +# +# This is file sourced by the systemd unit file + +# Append additional cli flags if needed. see: thalos-server -h +THALOS_SERVER_ARGS="-c /etc/thalos/config.yml" diff --git a/debian/thalos-server.service b/debian/thalos-server.service index 3265c1e..36bbb51 100644 --- a/debian/thalos-server.service +++ b/debian/thalos-server.service @@ -6,9 +6,10 @@ After=network.target User=thalos Group=thalos Type=simple -ExecStart=/usr/bin/thalos-server -c /etc/thalos/config.yml +EnvironmentFile=-/etc/sysconfig/thalos-server +ExecStart=/usr/bin/thalos-server $THALOS_SERVER_ARGS ExecReload=kill -HUP $MAINPID Restart=on-failure [Install] -WantedBy=multi-user.target \ No newline at end of file +WantedBy=multi-user.target diff --git a/debian/thalos.install b/debian/thalos.install index 510fa2e..6de9f98 100644 --- a/debian/thalos.install +++ b/debian/thalos.install @@ -1 +1,2 @@ -debian/thalos-server.service /lib/systemd/system \ No newline at end of file +debian/thalos-server.service /lib/systemd/system +debian/sysconfig/thalos-server /etc/sysconfig