add full path for users and wc binary
This commit is contained in:
parent
41ecec808c
commit
40829dfbe9
2
main.go
2
main.go
@ -23,7 +23,7 @@ func main() {
|
|||||||
|
|
||||||
app.Get("/online", func(c *fiber.Ctx) error {
|
app.Get("/online", func(c *fiber.Ctx) error {
|
||||||
// Get the number of users online
|
// 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 {
|
if err != nil {
|
||||||
log.Error(err)
|
log.Error(err)
|
||||||
return c.SendStatus(fiber.StatusInternalServerError)
|
return c.SendStatus(fiber.StatusInternalServerError)
|
||||||
|
Loading…
Reference in New Issue
Block a user