0

Hi I was just wondering if this script looks ok I run it after I login thanks.

#!/bin/bash echo "hi, starting wifi, nft and desktop" sudo ls sudo systemctl start wpaStart.service sudo nft -f ~/config/nftLocal startxfce4 
3
  • Please edit your question and explain what you want the script to do. Running sudo ls seems pointless, as does the echo. Who will be running this? How? How do you give the password? Is the script running interactively? Commented yesterday
  • 2
    that doesn't seem very sensible, especially since it does sudos that you shouldn't: it starts services that should almost certainly be activated in a different way, running a program on a user-owned directory but as root user (leading to fun ownerships and exploitability effects). And, starting nft after your network comes up is another really bad idea. This all screams "your system has useful session management built, in, but somehow you're trying to use it as if you only had desktop linuxes of the year 1995, and it's biting you". Commented yesterday
  • 1
    If you're looking for a Code Review, then there's a site for that. But if you post there, you'll need to be clear about the script's purpose; it would also be helpful to mention what testing you have done. Commented yesterday

0

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.