Commit 5deb2ec4 authored by Thiago Abdo's avatar Thiago Abdo Committed by root
Browse files

SCRUM#338: Adds systemd service


Signed-off-by: default avatarThiago Abdo <tja14@inf.ufpr.br>
parent ed100fdc
[Unit]
Description=Configuração do multiterminal
Conflicts=getty@tty7.service plymouth-quit.service
After=systemd-user-sessions.service getty@tty7.service plymouth-quit.service
Before=lightdm.service
[Service]
Type=oneshot
TimeoutSec=infinity
ExecStart=/opt/le-multiterminal/multiterminal.sh
[Install]
WantedBy=graphical.target
......@@ -2,7 +2,7 @@
cd ../../
# Copia arquivos do X para systemd
install -m 644 etc/systemd/system/xorg-daemon.s* /etc/systemd/system
install -m 644 etc/systemd/system/* /etc/systemd/system
# Copia configs de usb para o udev
install -m 644 etc/udev/rules.d/* /etc/udev/rules.d
......@@ -25,8 +25,16 @@ install -m 755 usr/local/bin/xephyr-wrapper /usr/local/bin
install -d /etc/xdg/lightdm/lightdm.conf.d
install -m 644 etc/xdg/lightdm/lightdm.conf.d/*.conf /etc/xdg/lightdm/lightdm.conf.d
install -d /etc/le-multiterminal
install -d /opt/le-multiterminal
install -m 755 opt/le-multiterminal/* /opt/le-multiterminal
# roda o script que atualiza as configs do xorg
update-xorg-conf "Silicon.Motion" /etc/X11/xorg.conf.d/98-proinfo-*.conf
systemctl daemon-reload
systemctl enable le-multiterminal
# habilita e roda o xorg-daemon
systemctl enable xorg-daemon.socket
systemctl start xorg-daemon.socket
......
......@@ -27,9 +27,7 @@
set -x
#TODO: arrumar caminhos
export PATH=$PATH:$(pwd)
export PATH=$PATH:/opt/le-multiterminal
## Auxiliary scripts
source find-devices.sh
......
#!/bin/bash
###
## Um wrapper para o configurador do multiterminal
## Ele verifica a necessidade de reconfigurar/configurar o multiterminal e reinicia o sistema
###
set -x
####LOGFILE
if [ ! -d /var/log/le-multiterminal ]; then
mkdir -p /var/log/le-multiterminal
fi
CONFIG_FLAG=0
if [ ! -e /etc/le-multiterminal/configurado ]; then
touch /etc/le-multiterminal/configurado
CONFIG_FLAG=1
fi
if [ $CONFIG_FLAG -eq 1 ]; then
/opt/le-multiterminal/multiseat-controller.sh >> /var/log/le-multiterminal/controller.log 2>&1
reboot
fi
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment