feat(pikvm): Move cert files from /tmp
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.
This commit is contained in:
@@ -1,6 +1,8 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
rw
|
||||||
cert_location='/etc/kvmd/nginx/ssl'
|
cert_location='/etc/kvmd/nginx/ssl'
|
||||||
for cert_file in 'server.crt' 'server.key'; do
|
for cert_file in 'server.crt' 'server.key'; do
|
||||||
|
mv --force --verbose '/tmp/'"${cert_file}" "${cert_location%/}"'/'
|
||||||
chmod -v '0444' "${cert_location%/}"'/'"${cert_file}"
|
chmod -v '0444' "${cert_location%/}"'/'"${cert_file}"
|
||||||
done
|
done
|
||||||
systemctl restart kvmd-nginx.service
|
systemctl restart kvmd-nginx.service
|
||||||
|
Reference in New Issue
Block a user