Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Messages - jeje1307

#1
QuoteAnd one last question:
Is there a way to check whether ports are down/up and/or whether services are running/stopped through CLI, API or other?

if you just want to know if it's working Plugged or unplugged,
I did it, simply using shell command with regex. It's maybe not the best way to do it, but for now it work. And that's the best I can do.

I just started Linux a few days ago and i'm not a computer scientist neither a native english speaker, you have probably noticed that.

For exemple :

ifconfig igb2 | sed -n 's/.*status: \([^ ]*\).*/\1/gp'
Will result as : "Active" or if not active "no"

For the services i've seen that a file with extension .pid was created when a services is running.

#!/bin/sh
isvalidpid()
{
    /bin/pgrep -nF $1
}

is_process_running()
{
    /bin/pgrep -anx
}

if [ $(isvalidpid /var/run/ntpd.pid) > 1 ] && [ $(is_process_running) > 1 ]
then
    echo "Active"
else
    echo "Not"
fi

#2
QuoteAnd one last question:
Is there a way to check whether ports are down/up and/or whether services are running/stopped through CLI, API or other?

if you just want to know if it's working Plugged or unplugged,
I did it, simply using shell command with regex. It's maybe not the best way to do it, but for now it work. And that's the best I can do.

I just started Linux a few days ago and i'm not a computer scientist neither a native english speaker, you have probably noticed that.

For exemple :

ifconfig igb2 | sed -n 's/.*status: \([^ ]*\).*/\1/gp'
Will result as : "Active" or if not active "no"

For the services i tried something probably unprofessionnal, but i've seen that a file with extension .pid was created when a services is running.

So i just create an if condition to see if yes or no the file is there.

if [ -e "/var/run/configd.pid" ];then
echo "configd active";
else
echo "configd not active"
fi


it doesn't work for all services, i'm trying to find another solution.

if you guys have a better idea, it would be great. Because i'm pretty sure what i did is like DIY.

HOW CAN I DELETE THIS MESSAGE ?
#3
Greetings,

I have seen in a few old subject like this one : https://forum.opnsense.org/index.php?topic=3553.0 that in version 17.7 we would see CLI  firewall rules editing.

- Is it available ?
if YES, How do we edit a rules ?
if NO, Is it comming soon ?

Apologies if this has been answered elsewhere, however I could not find anything through my forum search.


Best Regards

#4
QuoteI thought configctl firmware upgrade could be exactly what I am looking for. Could you explain why it return a 'cannot upgrade' error even though updates are available

QuoteAnd one last question:
Is there a way to check whether ports are down/up and/or whether services are running/stopped through CLI, API or other?

I've got the exact same questions as noname.

Did anyone find the answer ?