Enviado em 08/08/2024 - 04:54h
Fala galera, blz?vlc /home/usuario/Gestao_A_Vista/video.mp4 -f --repeat --quiet
sudo mkdir /diretorio
sudo nano /diretorio/meu-script.sh
sudo chmod +x /diretorio/meu-script.sh
sudo /diretorio/meu-script.sh
sudo nano /lib/systemd/system/meu-script.service
[Unit]
Description=Meu script
[Service]
ExecStart=/bin/bash /diretorio/meu-script.sh
[Install]
WantedBy=multi-user.target
sudo systemctl daemon-reload
sudo systemctl enable meu-script
sudo systemctl start meu-script
sudo shutdownn -r now
#!/bin/bash
cd /home/usuario/Gestao_A_Vista
diretorio=$(pwd)
echo $diretorio
video=$(cd $diretorio && ls | grep *.mp4)
echo $video
#vlc /home/usuario/Gestao_A_Vista/$video -f --repeat --quiet
vlc $diretorio/$video -f --repeat --quiet
sudo systemctl status ini_gestao
● ini_gestao.service - Meu script para teste
Loaded: loaded (/lib/systemd/system/ini_gestao.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Thu 2024-08-08 04:35:10 -03; 12min ago
Main PID: 5869 (code=exited, status=1/FAILURE)
ago 08 04:35:05 hostname ini_gestao.sh[5869]: Air.mp4
ago 08 04:35:05 hostname ini_gestao.sh[5907]: mkdir: cannot create directory '/run/user/0': P>
ago 08 04:35:05 hostname ini_gestao.sh[5928]: realpath: '': No such file or directory
ago 08 04:35:05 hostname ini_gestao.sh[5932]: realpath: '': No such file or directory
ago 08 04:35:05 hostname ini_gestao.sh[5934]: realpath: '': No such file or directory
ago 08 04:35:05 hostname ini_gestao.sh[5936]: realpath: '': No such file or directory
ago 08 04:35:05 hostname ini_gestao.sh[5940]: realpath: '': No such file or directory
ago 08 04:35:05 hostname ini_gestao.sh[5942]: realpath: '': No such file or directory
ago 08 04:35:10 hostname systemd[1]: ini_gestao.service: Main process exited, code=exited, st>
ago 08 04:35:10 hostname systemd[1]: ini_gestao.service: Failed with result 'exit-code'.
Comparação entre os escalonadores BFQ e MQ-Deadline (acesso a disco) no Arch e Debian
Conciliando o uso da ZRAM e SWAP em disco na sua máquina
Servidor de Backup com Ubuntu Server 24.04 LTS, RAID e Duplicati (Dell PowerEdge T420)
Visualizar câmeras IP ONVIF no Linux sem necessidade de instalar aplicativos
Overclocking Permanente para Drastic no Miyoo Mini Plus
Problemas de chaves (/usr/share/keyrings) no Debian
Converter os repositórios Debian para o novo formato com as chaves
Rede wifi com mesmo ip da rede eth (12)
Primeiras impressões do Debian 13 (3)
como resolver o problema de som do linux mint mate (3)