Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Service Status [ Running | Stopped ] - Command required for the status #23

Closed
B0F1B0 opened this issue May 9, 2024 · 3 comments
Closed

Comments

@B0F1B0
Copy link

B0F1B0 commented May 9, 2024

I need a command to get Service Status [ Running | Stopped ].

Policy Based Routing - Status - Service Status - Running

Policy Based Routing - Status - Service Status - Stopped

Under unknown circumstances, PBR stops working and the service stops. For a script I need the command to query the service status [Running or Stopped].

If i run the command service pbr status | grep stopped when PBR has stopped, it return nothing.
Also the command service pbr running return nothing.

Please tell me which command is used to query the current status (Running or Stopped). 🙂

@stangri
Copy link
Owner

stangri commented May 13, 2024

  1. You're running a very old version, I'd recommend switching to a latest version in my repo and enabling nft_file_mode option.
  2. With the latest version you can do:
    . /etc/init.d/pbr
    is_running && echo "running" || echo "stopped"

@B0F1B0
Copy link
Author

B0F1B0 commented May 13, 2024

  1. You're running a very old version, I'd recommend switching to a latest version in my repo and enabling nft_file_mode option.
  2. With the latest version you can do:
    . /etc/init.d/pbr
    is_running && echo "running" || echo "stopped"

Thanks for your reply 🙂

  1. I am running the latest Version from your repo and nft_file_mode is also enabled: Version 1.1.5-1 - Running (fw4 nft file mode).
  2. Thanks for the command. But in my case i will use:
. /etc/init.d/pbr
is_running_nft && echo "running" || echo "stopped"

@B0F1B0 B0F1B0 closed this as completed May 13, 2024
@stangri
Copy link
Owner

stangri commented May 13, 2024

  1. I am running the latest Version from your repo and nft_file_mode is also enabled: Version 1.1.5-1 - Running (fw4 nft file mode).

Sorry, didn't see the version correctly with my bleary eyes.

  • Thanks for the command. But in my case i will use:

I'd recommend you use the command I posted.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants