Add systemd units and bump package version

This commit is contained in:
Timothée Floure 2018-08-22 16:27:01 +02:00
parent 3c92e2c35d
commit 0092195f92
5 changed files with 28 additions and 3 deletions

View file

@ -3,5 +3,7 @@ PREFIX ?= /usr
build:
install:
mkdir -p $(DESTDIR)$(PREFIX)/bin
cp unipoly-mlmmj-ldap-sync.rb $(DESTDIR)$(PREFIX)/bin/unipoly-mlmmj-ldap-sync
mkdir -p $(DESTDIR)$(PREFIX)/bin /etc /lib/systemd/system
install -m755 unipoly-mlmmj-ldap-sync $(DESTDIR)$(PREFIX)/bin/unipoly-mlmmj-ldap-sync
install -m644 config.example.com /etc/unipoly-mlmmj-ldap-sync.toml
install -m644 unipoly-mlmmj-ldap-sync.service unipoly-mlmmj-ldap-sync.timer /lib/systemd/system

7
debian/changelog vendored
View file

@ -1,3 +1,10 @@
unipoly-mlmmj-ldap-sync (0.2) unstable; urgency=low
* Add systemd units.
* Add default configuration file.
-- Timothée Floure <timothee.floure@epfl.ch> Wed, 22 Aug 2018 16:25:00 +0200
unipoly-mlmmj-ldap-sync (0.1) unstable; urgency=low
* Let there be package.

View file

@ -3,7 +3,7 @@
require 'toml'
require 'net/ldap'
@configuration_file = "conf.example.toml"
@configuration_file = "/etc/unipoly-mlmmj-ldap-sync.toml"
def read_configuration(path)
TOML.load_file(path)

View file

@ -0,0 +1,7 @@
[Unit]
Description=Synchronize Unipoly's mailing lists with their LDAP groups
After=network.target
[Service]
Type=simple
ExecStart=/usr/bin/unipoly-mlmmj-ldap-sync

View file

@ -0,0 +1,9 @@
[Unit]
Description=Synchronize Unipoly's mailing lists with their LDAP groups once a day
[Timer]
OnCalendar=*-*-* 3:00:00
Persistent=true
[Install]
WantedBy=timers.target