// Criar arquivo boot
sudo vim /etc/systemd/system/boot-splashscreen.service
sudo vim /etc/systemd/system/powerdown-image.service
sudo vim /etc/systemd/system/unplug-image.service
// Instalar lib
sudo apt-get install fim
// Habilitar serviços
sudo systemctl enable boot-splashscreen.service
sudo systemctl start boot-splashscreen.service
sudo systemctl enable powerdown-image.service
sudo systemctl start powerdown-image.service
sudo systemctl enable unplug-image.service
sudo systemctl start unplug-image.service
// boot-splashscreen.service
[Unit]
Description=boot splash screen
[Service]
ExecStart=/usr/bin/fim -q -a /opt/splashscreen/bootimage.png
[Install]
WantedBy=basic.target
// powerdown-image.service
[Unit]
Description=show image on starting shutdown
DefaultDependencies=no
Before=halt.target
[Service]
StandardInput=tty
StandardOutput=tty
ExecStart=/usr/bin/fim -q -a /opt/splashscreen/powerdownimage.jpg
ExecStartPost=/bin/sleep 3
[Install]
WantedBy=halt.target poweroff.target
// unplug-image.service
[Unit]
Description=safe-to-power-off image
DefaultDependencies=no
After=umount.target
Before=final.target
[Service]
StandardInput=tty
StandardOutput=tty
ExecStart=/usr/bin/fim -q -a /opt/splashscreen/unplugimage.jpg
ExecStartPost=/bin/sleep 3
[Install]
WantedBy=shutdown.target