mirror of
https://github.com/TheBinaryNinja/tvapp2.git
synced 2026-06-04 07:05:42 -04:00
Initial upload
This commit is contained in:
20
root/etc/s6-overlay/s6-rc.d/init-keygen/run
Normal file
20
root/etc/s6-overlay/s6-rc.d/init-keygen/run
Normal file
@@ -0,0 +1,20 @@
|
||||
#!/usr/bin/with-contenv bash
|
||||
# shellcheck shell=bash
|
||||
|
||||
# #
|
||||
# @project thetvapp-docker
|
||||
# @about Manages self-signed ssl certificates
|
||||
# @file /root/etc/s6-overlay/s6-rc.d/init-keygen/run
|
||||
# @repo https://github.com/Aetherinox/thetvapp-docker
|
||||
# #
|
||||
|
||||
SUBJECT="/C=US/ST=CA/L=NA/O=thetvapp-docker/OU=Aetherinox TheTvApp/CN=*"
|
||||
if [[ -f /config/keys/cert.key && -f /config/keys/cert.crt ]]; then
|
||||
echo -e " SSL : Using existing keys found in /config/keys"
|
||||
else
|
||||
echo -e " SSL : Generating self-signed keys in folder/config/keys. Replace if needed."
|
||||
rm -f \
|
||||
/config/keys/cert.key \
|
||||
/config/keys/cert.crt || true
|
||||
openssl req -new -x509 -days 3650 -nodes -out /config/keys/cert.crt -keyout /config/keys/cert.key -subj "$SUBJECT"
|
||||
fi
|
||||
Reference in New Issue
Block a user