💾 Archived View for gemini.rmf-dev.com › repo › Vaati › RouterMonitor › files › 4ad9e841b44db5701253… captured on 2023-12-28 at 15:40:57. Gemini links have been rewritten to link to archived content

View Raw

More Information

⬅️ Previous capture (2023-09-08)

-=-=-=-=-=-=-

Go Back

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