Created
June 11, 2015 05:18
-
-
Save abn/b047e07ddc71ff6362c0 to your computer and use it in GitHub Desktop.
Enable cockpit on Fedora 22
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env bash | |
| # based on instructions provided at | |
| # http://www.projectatomic.io/blog/2015/06/running-cockpit-as-a-service/ | |
| atomic info fedora/cockpitws | |
| atomic install fedora/cockpitws | |
| cat > /etc/systemd/system/cockpitws.service << EOF | |
| [Unit] | |
| Description=Cockpit Web Interface | |
| Requires=docker.service | |
| After=docker.service | |
| [Service] | |
| Restart=on-failure | |
| RestartSec=10 | |
| ExecStart=/usr/bin/docker run --rm --privileged --pid host -v /:/host --name %p fedora/cockpitws /container/atomic-run --local-ssh | |
| ExecStop=-/usr/bin/docker stop -t 2 %p | |
| [Install] | |
| WantedBy=multi-user.target | |
| EOF | |
| systemctl daemon-reload | |
| systemctl enable cockpitws.service | |
| systemctl start cockpitws.service | |
| systemctl status cockpitws.service |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment