Add template unit file

This allows the user to start espeakup service from the command-line
interface setting a specific voice/language without needing to edit
the unit file, which could be complicated for blind or visually
impaired users that do not understand English enough to hear English
espeakup before setting it to the desired language.

Example usage:
  systemd start espeakup@pt
This commit is contained in:
Rafael Fontenelle 2021-07-03 13:28:51 -03:00 committed by Alexander Epaneshnikov
commit 3165945186
No known key found for this signature in database
GPG key ID: 1736C918F59A5673
2 changed files with 25 additions and 1 deletions

View file

@ -0,0 +1,18 @@
[Unit]
Description=Software speech output for Speakup
Documentation=man:espeakup(8)
Wants=modprobe@speakup_soft.service
After=modprobe@speakup_soft.service sound.target
Conflicts=espeakup.service
[Service]
Type=forking
PIDFile=/run/espeakup.pid
ExecStart=@bindir@/espeakup --default-voice=%I
ExecReload=kill -HUP $MAINPID
Restart=always
Nice=-10
OOMScoreAdjust=-900
[Install]
WantedBy=sound.target

View file

@ -11,6 +11,12 @@ service_file = configure_file(
configuration : unit_conf
)
install_data(service_file,
user_service_file = configure_file(
input : 'espeakup@.service.in',
output : 'espeakup@.service',
configuration : unit_conf
)
install_data(service_file, user_service_file,
install_dir : unitdir
)