Commit b99efe2
committed
feat: add --start-daemon option to automatically start Docker service
Add a new --start-daemon command-line option that automatically starts
and enables the Docker daemon service after installation. This addresses
the cross-platform service management differences between distributions
like CentOS and Ubuntu mentioned in issue #124.
Features:
- Detects systemd availability and uses appropriate service commands
- Uses systemctl start/enable on systemd systems
- Falls back to service/chkconfig on non-systemd systems
- Supports --dry-run to show what commands would be executed
- Only starts daemon when explicitly requested via --start-daemon flag
- Works across all supported distributions (Ubuntu, Debian, CentOS, RHEL, Fedora)
The implementation is safe by default - the daemon is only started when
the user explicitly requests it, maintaining backward compatibility.
Fixes #124
Signed-off-by: Gajesh Bhat <[email protected]>1 parent 5944d4d commit b99efe2
1 file changed
+79
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
75 | 75 | | |
76 | 76 | | |
77 | 77 | | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
78 | 89 | | |
79 | 90 | | |
80 | 91 | | |
| |||
110 | 121 | | |
111 | 122 | | |
112 | 123 | | |
| 124 | + | |
113 | 125 | | |
114 | 126 | | |
115 | 127 | | |
| |||
123 | 135 | | |
124 | 136 | | |
125 | 137 | | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
126 | 141 | | |
127 | 142 | | |
128 | 143 | | |
| |||
267 | 282 | | |
268 | 283 | | |
269 | 284 | | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
| 327 | + | |
| 328 | + | |
| 329 | + | |
| 330 | + | |
| 331 | + | |
| 332 | + | |
| 333 | + | |
| 334 | + | |
| 335 | + | |
| 336 | + | |
| 337 | + | |
| 338 | + | |
| 339 | + | |
| 340 | + | |
| 341 | + | |
| 342 | + | |
270 | 343 | | |
271 | 344 | | |
272 | 345 | | |
| |||
564 | 637 | | |
565 | 638 | | |
566 | 639 | | |
| 640 | + | |
| 641 | + | |
| 642 | + | |
567 | 643 | | |
568 | 644 | | |
569 | 645 | | |
| |||
666 | 742 | | |
667 | 743 | | |
668 | 744 | | |
| 745 | + | |
| 746 | + | |
| 747 | + | |
669 | 748 | | |
670 | 749 | | |
671 | 750 | | |
| |||
0 commit comments