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'.
Atualizando o Passado: Linux no Lenovo G460 em 2025
aaPanel - Um Painel de Hospedagem Gratuito e Poderoso
O macete do Warsaw no Linux Mint e cia
Visualizar arquivos em formato markdown (ex.: README.md) pelo terminal
Dando - teoricamente - um gás no Gnome-Shell do Arch Linux
Como instalar o Google Cloud CLI no Ubuntu/Debian
Mantenha seu Sistema Leve e Rápido com a Limpeza do APT!
Procurando vídeos de YouTube pelo terminal e assistindo via mpv (2025)
Pastas da raiz foram para a área de trabalho [RESOLVIDO] (10)
Será que eu deveria apreender C/C++ para desenvolver para Linux? (4)