Kod: Markera allt
#!/bin/bash
until [ "$action" = "x" ];
do
echo""
echo "FTP-administration"
echo""
echo " s -> Starta FTP-servern"
echo " r -> Starta om FTP-servern"
echo " p -> Stoppa FTP-servern"
echo " l -> Visa log"
echo " c -> vsftpd.conf"
echo " x -> Avsluta FTP-administration"
echo "Välj alternativ:"
read action
if [ "$action" = "s" ]; then
sudo /etc/init.d/vsftpd start
elif [ "$action" = "r" ]; then
sudo /etc/init.d/vsftpd restart
elif [ "$action" = "p" ]; then
sudo /etc/init.d/vsftpd stop
elif [ "$action" = "l" ]; then
sudo gedit /var/log/vsftpd.log
elif [ "$action" = "c" ]; then
sudo gedit /etc/vsftpd.conf
elif [ "$action" = "x" ]; then
exit
fi
done
Kod: Markera allt
sudo gedit /var/log/vsftpd.log &
Hur skriver jag för att få gedit att öppnas med loggen och samtidigt få tillbaka alternativen i terminalfönstret?