Enviado em 03/08/2019 - 19:46h
bom, eu não estou conseguindo fazer meu código funcionar, eu sou novo ainda em shell script e queria uma ajuda, esse aqui é o codigo para automatizar o start do serviço postgresql#!/bin/bash stsql=$(service postgresql status | grep active | cut -d ' ' -f 5); if[ $stsql = "inactive"]; then service postgresql start; msfconsole -x "use multi/handler;"; fi ./msf.sh: linha 5: if[ inactive = inactive]: comando não encontrado ./msf.sh: linha 6: erro de sintaxe próximo ao token inesperado `then' ./msf.sh: linha 6: `then'
Enviado em 05/08/2019 - 08:32h
Seu "if" tá incorreto. Deve ficar assim:#!/bin/bash stsql=$(service postgresql status | grep active | cut -d ' ' -f 5) if [ $stsql == "inactive"] then service postgresql start msfconsole -x "use multi/handler;" fi
tux-gpt - Assistente de IA para o Terminal
Instalação e configuração do Chrony
Programa IRPF - Guia de Instalação e Resolução de alguns Problemas
Como instalar no Linux Jogos da Steam só para Windows
Instalando o Team Viewer no Debian Trixie - problema no Policykit
O Que Fazer Após Instalar Ubuntu 25.04
O que você está ouvindo agora? [2] (173)
Copiar Layout do Teclado para aplicar em outra Distribuição (8)
Alguém poderia me ajudar a escolher peças pra montar um desktop? [RESO... (34)