💾 Archived View for gemini.rmf-dev.com › repo › Vaati › RouterMonitor › files › 4ad9e841b44db5701253… captured on 2023-11-14 at 08:28:28. Gemini links have been rewritten to link to archived content
⬅️ Previous capture (2023-09-08)
-=-=-=-=-=-=-
0 #!/bin/sh
1 if [ ! "$@" ]; then
2 echo "$0 <your.hostname>"
3 exit
4 fi
5 openssl genrsa -out private.key 4096
6 openssl req -new -key private.key -out server.csr -subj "/CN=$@"
7 openssl x509 -sha256 -req -days 365 \
8 -in server.csr \
9 -signkey private.key \
10 -out server.crt
11 mv private.key /etc/ssl/private/$@.key
12 mv server.crt /etc/ssl/$@.crt
13 chmod 600 /etc/ssl/$@.crt
14 chmod 600 /etc/ssl/private/$@.key
15