add full path for users and wc binary

This commit is contained in:
Arya Kiran 2023-01-07 22:26:25 +05:30
parent 41ecec808c
commit 40829dfbe9
No known key found for this signature in database
GPG Key ID: 3A6EA2D0EE314EEF
1 changed files with 1 additions and 1 deletions

View File

@ -23,7 +23,7 @@ func main() {
app.Get("/online", func(c *fiber.Ctx) error {
// Get the number of users online
out, err := exec.Command("users | wc -l").Output()
out, err := exec.Command("/usr/bin/users | /usr/bin/wc -l").Output()
if err != nil {
log.Error(err)
return c.SendStatus(fiber.StatusInternalServerError)