Score:0

How do I create a script file for terminal commands that require sudo permissions

jp flag

my system keeps killing my wifi connection and I am having to use the terminal to restart it using the following comand

sudo systemctl restart NetworkManager

how would i write a script for this that I could place in my favorites bar

user535733 avatar
cn flag
Seems like a workaround. The problem may be permanently fixable. Of course, it may not be, too.
Score:2
it flag

I've written a bash script to help with this: https://github.com/waltinator/net-o-matic It watches the connection, and when the connection drops, does a user-specified thing to try to reconnect.

Look at the logs! sudo journalctl -b 0 -u NetworkManager. Read man journalctl.

Joshua Flynn avatar
jp flag
I see your code there but fil to see where to and how to modify it for my system
waltinator avatar
it flag
The `net-o-matic.conf` file shows examples.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.