Linux:Services: Difference between revisions
From Cheatsheet
Jump to navigationJump to search
(→Checks) |
|||
| Line 18: | Line 18: | ||
# Execute a command inside a container as a specific user | # Execute a command inside a container as a specific user | ||
docker exec -it -u root asd87289hasdadz tail /var/log/nginx/access.log | docker exec -it -u root asd87289hasdadz tail /var/log/nginx/access.log | ||
# Restart docker container yogapants | |||
docker restart yogapants | |||
# Restart the 3 given containers | |||
docker restart 79f71c7f4d91 bbb3d3f5c3b1 b0a3204d4098 | |||
</syntaxhighlight> | </syntaxhighlight> | ||
Revision as of 15:51, 24 August 2023
Docker
Checks
# List docker containers docker ps # List logs for container 987sdh3qrasdhj docker logs 987sdh3qrasdhj
Commands
# Enter the shell inside a docker container docker exec -ti a89sd98sa7d /bin/bash # Execute a command inside a container as a specific user docker exec -it -u root asd87289hasdadz tail /var/log/nginx/access.log # Restart docker container yogapants docker restart yogapants # Restart the 3 given containers docker restart 79f71c7f4d91 bbb3d3f5c3b1 b0a3204d4098
PowerDNS
- https://doc.powerdns.com/authoritative/index.html
- https://doc.powerdns.com/authoritative/manpages/pdns_server.1.html
- https://doc.powerdns.com/authoritative/manpages/pdnsutil.1.html
Checks
# List commands pdns_server --help # Check config and parse for errors pdns_server --config=check
# List available commands pdnsutil --help # Check config and parse for errors pdnsutil --config=check # List all available zones pdnsutil list-all-zones # List all domains in the primary zone pdnsutil list-all-zones primary # See zone information for a specific domain pdnsutil show-zone mydomain.com pdnsutil show-zone 77.5.10.in-addr.arpa # Check zone for errors pdnsutil check-zone mydomain.com # List all created TSIG keys pdnsutil list-tsig-keys
Commands
# Activate TSIG key for domain "myexample.com" in the primary zone pdnsutil " myexample.com transfer primary
MAAS
Checks
Logs in either place: /var/log/maas/ /var/snap/maas/common/log
# List status of MAAS services maas status # List MAAS commands maas --help # List available arguments for the init command maas init --help