#+TITLE: Unit Translator
#+AUTHOR: Mark Hindley

* About
Unit Translator is written (/almost purely/) in bash and converts systemd-style
units to generic unix equivalents.

It is based on Systemd Unit Translator, written by K Gopal Krishna as part of
the Google Summer of Code, 2020.

* Dependencies
- GNU =grep=, =sed=, =awk=

* Usage

See the [[file:man/utrans.1][Manual]].

Packages for [[https://tracker.debian.org/pkg/unit-translator][Debian and derivatives]] are available.

It can also be run directly from a local copy of the [[https://git.devuan.org/LeePen/unit-translator/][=git= repository]]. Set
the UTRANS_DATA_DIR and UNIT_TRANSLATOR environment variables:-

#+begin_src sh
  git clone https://git.devuan.org/LeePen/unit-translator
  UTRANS_DATA_DIR=./unit-translator ./unit-translator/utrans /lib/systemd/system/unit.service /tmp
  UTRANS_DATA_DIR=./unit-translator UNIT_TRANSLATOR=./unit-translator/utrans ./unit-translator/utrans-rc
#+end_src

* References
- https://linux.die.net/man/8/xinetd
- https://manpages.debian.org/unstable/socket-activate/socket-activate.1.en.html
- https://www.freedesktop.org/software/systemd/man/systemd.service.html
- https://www.freedesktop.org/software/systemd/man/systemd.socket.html
- https://www.freedesktop.org/software/systemd/man/systemd.time.html#
- https://www.freedesktop.org/software/systemd/man/systemd.timer.html
- https://www.freedesktop.org/software/systemd/man/systemd.unit.html

