Xfce Forum

Sub domains
 

You are not logged in.

#1 2022-02-22 07:21:03

ruuwa
Member
Registered: 2022-02-09
Posts: 19

[SOLVED] systemctl commands in script doesn't prompt password anymore

Hi, 

So because of internet connection problem sometimes I need to restart/toggle my iwd's systemd service. 

Simple script like:

#!/usr/bin/env bash

if [ "$(systemctl is-active iwd)" = "active" ]; then
  systemctl stop iwd
else
  systemctl start iwd
fi

I use this in my xfce launcher:

bash -c /path/to/toggle-wifi.sh

When I clicked the launcher in my xfce panel, usually it opens a window prompt asking for password. But it stops doing that for some reason. 

Anyone can help?

edit: Never mind, restart fixed it. I was talking about the Authentication prompt. The one that says, "Authentication is required to stop 'iwd.service'." and asks for my password.

Last edited by ruuwa (2022-02-22 07:29:23)

Offline

Board footer

Powered by FluxBB