Commit 17789b7
authored
Update v-list-sys-services to avoid 0 min uptime (hestiacp#3962)
Modify pidof command to use -d option to assign a delimiter so there is no need to use tr to change spaces by pipes.
In services with several pids, the script is taking the first pid in the list, but the first pid is the pid for last process, not the main process so a lot of times you can see an uptime of 0 mins instead of the actual uptime for the main/master process. So, I've modified it to get the last pid in the list instead of the first.1 parent e910ab8 commit 17789b7
1 file changed
+3
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
87 | 87 | | |
88 | 88 | | |
89 | 89 | | |
90 | | - | |
| 90 | + | |
91 | 91 | | |
92 | | - | |
| 92 | + | |
93 | 93 | | |
94 | 94 | | |
95 | 95 | | |
| |||
107 | 107 | | |
108 | 108 | | |
109 | 109 | | |
110 | | - | |
| 110 | + | |
111 | 111 | | |
112 | 112 | | |
113 | 113 | | |
| |||
0 commit comments