User Tools

Site Tools


geek:cli

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
geek:cli [2019/09/27 15:12]
neil created
geek:cli [2024/05/23 12:55] (current)
admin
Line 28: Line 28:
 fswatch -0 example.php | xargs -0 -n 1 -I {} php {} fswatch -0 example.php | xargs -0 -n 1 -I {} php {}
 </​code>​ </​code>​
 +
 +===== Certificate Expiry =====
 +Check the expiry date on a SSL certificate PEM file:
 +<code bash>
 +openssl x509 -enddate -noout -in cert.pem ​
 +</​code>​
 +Read a certificate directly from a URL:
 +<code bash>
 +echo | openssl s_client -showcerts -servername glasgow.social -connect glasgow.social:​443 2>/​dev/​null | openssl x509 -inform pem -noout -text
 +
 +</​code>​
 +
 +===== Journalctl =====
 +I'm so used to using init.d I can't keep these instructions in my head, so they'​re written here until I remember them.
 +=== Listing all available services ===
 +<code bash>​systemctl list-unit-files --all | grep enabled</​code>​
 +=== Getting logs for a particular service ===
 +<code bash>​journalctl -u sshd</​code>​
geek/cli.1569593530.txt.gz ยท Last modified: 2019/09/27 15:12 by neil