File tree Expand file tree Collapse file tree 4 files changed +11
-3
lines changed
Expand file tree Collapse file tree 4 files changed +11
-3
lines changed Original file line number Diff line number Diff line change 1+ * text =auto
Original file line number Diff line number Diff line change @@ -25,6 +25,14 @@ PHP wrapper for systemctl (PHP7.1)
2525SystemCtl::setBinary('/bin/systemctl');
2626```
2727
28+ ## How to change command timeout
29+ To change command tmeout simply call the static method ` setTimeout ` .
30+ ``` php
31+ SystemCtl::setTimeout(10);
32+ ```
33+
34+ > The default timeout is set to ` 3 ` seconds
35+
2836## "I need sudo to run commands"
2937If you need sudo, you should execute the bin executable with sudo.
3038The incode support was dropped due to security reason.
Original file line number Diff line number Diff line change @@ -111,7 +111,7 @@ public function getService(string $name): Service
111111
112112 /**
113113 * @param null|string $unitPrefix
114- * @return array| Service[]
114+ * @return Service[]
115115 */
116116 public function getServices (?string $ unitPrefix = null ): array
117117 {
@@ -133,7 +133,7 @@ public function getTimer(string $name): Timer
133133
134134 /**
135135 * @param null|string $unitPrefix
136- * @return array| Timer[]
136+ * @return Timer[]
137137 */
138138 public function getTimers (?string $ unitPrefix = null ): array
139139 {
Original file line number Diff line number Diff line change @@ -152,7 +152,6 @@ public function testGetTimers()
152152
153153 public function testSetBinaryShouldChangeCommand ()
154154 {
155- // Reset sudo to default
156155 $ systemCtl = new SystemCtl ();
157156
158157 $ processBuilder = $ systemCtl ->getProcessBuilder ();
You can’t perform that action at this time.
0 commit comments