We now have acme.sh copy cert files into a directory that's writable, specifically into '/tmp', this happens outside the scope of this script purely within acme.sh. Most mounts remain mounted read-only so we amend this script to make the '/' mount point read-writable and move cert files into their correct location before making the '/' mount point read-only again.
10 lines
272 B
Bash
Executable File
10 lines
272 B
Bash
Executable File
#!/bin/bash
|
|
rw
|
|
cert_location='/etc/kvmd/nginx/ssl'
|
|
for cert_file in 'server.crt' 'server.key'; do
|
|
mv --force --verbose '/tmp/'"${cert_file}" "${cert_location%/}"'/'
|
|
chmod -v '0444' "${cert_location%/}"'/'"${cert_file}"
|
|
done
|
|
systemctl restart kvmd-nginx.service
|
|
ro
|