From 4f4c903c05ce93a291c757ee899b464db63077ad Mon Sep 17 00:00:00 2001 From: Baptiste Jonglez Date: Fri, 25 May 2018 21:10:55 +0200 Subject: [PATCH] Add example systemd unit files, courtesy of ARN --- init/README.md | 18 ++++++++++++++++++ init/bird-lg-proxy.service | 31 +++++++++++++++++++++++++++++++ init/bird-lg-webservice.service | 32 ++++++++++++++++++++++++++++++++ 3 files changed, 81 insertions(+) create mode 100644 init/README.md create mode 100644 init/bird-lg-proxy.service create mode 100644 init/bird-lg-webservice.service diff --git a/init/README.md b/init/README.md new file mode 100644 index 0000000..fdf49b6 --- /dev/null +++ b/init/README.md @@ -0,0 +1,18 @@ +# bird-lg init + +Systemd unit files for the bird-lg webservice, and for the proxy service running on routers. + +You need to adapt the exact command used to start the service (`ExecStart`) and the `User` +under which it should run. Don't run the services as root! + +## Installation + +Copy the init file under `/etc/systemd/system/` and run: + + systemctl daemon-reload + systemctl start bird-lg-proxy + systemctl enable bird-lg-proxy + +## Credits + +Adapted from diff --git a/init/bird-lg-proxy.service b/init/bird-lg-proxy.service new file mode 100644 index 0000000..e0b579e --- /dev/null +++ b/init/bird-lg-proxy.service @@ -0,0 +1,31 @@ +# Copyright (C) 2015-2018 Alsace Réseau Neutre +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + + +# Debian GNU/Linux: store this in /etc/systemd/system/ + + +[Unit] +Description=BIRD Looking-Glass proxy +After=bird.service bird6.service + +[Service] +Type=simple +ExecStart=/usr/local/lookingglass/lgproxy.py +User=lgproxy +Restart=on-failure + +[Install] +WantedBy=multi-user.target diff --git a/init/bird-lg-webservice.service b/init/bird-lg-webservice.service new file mode 100644 index 0000000..0ee3ed1 --- /dev/null +++ b/init/bird-lg-webservice.service @@ -0,0 +1,32 @@ +# Copyright (C) 2015-2018 Alsace Réseau Neutre +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + + +# Debian GNU/Linux: store this in /etc/systemd/system/ + + +[Unit] +Description=BIRD Looking-Glass service +After=apache2.service + +[Service] +Type=simple +User=lookingglass +ExecStart=/usr/local/lookingglass/lg.py +Restart=on-failure + +[Install] +WantedBy=multi-user.target +