Änderungen

Aus Hackerspace Ffm
Wechseln zu: Navigation, Suche

DCEM's bash script howto

4 Byte hinzugefügt, 12:22, 8. Jan. 2020
/* expansions: on - EOF needs to be unquoted */
EOF is unquoted => all lines of the here-document are subjected to parameter expansion, command substitution, and arithmetic expansion, the character sequence \newline is ignored, and ‘\’ must be used to quote the characters ‘\’, ‘$’, and ‘`’.
<codenowiki>
cat > /etc/nginx/snippets/letsencrypt.conf << EOF
ssl_certificate /etc/letsencrypt/live/$(hostname)/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/$(hostname)/privkey.pem;
EOF
</codenowiki>
<code style="white-space: nowrap">$(hostname)</code> will be expanded
610
Bearbeitungen