mirror of
https://github.com/mtan93/hass-addons.git
synced 2026-03-08 05:31:54 +00:00
Create install-ucp.sh
This commit is contained in:
17
unifi-cam-proxy-main/install-ucp.sh
Normal file
17
unifi-cam-proxy-main/install-ucp.sh
Normal file
@@ -0,0 +1,17 @@
|
||||
echo Install pre-requisites
|
||||
apt install -y ffmpeg python3.8
|
||||
echo Checking OpenSSL
|
||||
openssl version -a
|
||||
echo Generating cert
|
||||
cd /tmp
|
||||
openssl ecparam -out /tmp/private.key -name prime256v1 -genkey -noout
|
||||
openssl req -new -sha256 -key /tmp/private.key -out /tmp/server.csr -subj "/C=TW/L=Taipei/O=Ubiquiti Networks Inc./OU=devint/CN=camera.ubnt.dev/emailAddress=support@ubnt.com"
|
||||
openssl x509 -req -sha256 -days 36500 -in /tmp/server.csr -signkey /tmp/private.key -out /tmp/public.key
|
||||
cat /tmp/private.key /tmp/public.key > client.pem
|
||||
rm -f /tmp/private.key /tmp/public.key /tmp/server.csr
|
||||
echo Copy SSL Cert
|
||||
cp /tmp/client.pem /opt/client.pem
|
||||
echo installing unifi-cam-proxy
|
||||
pip install unifi-cam-proxy
|
||||
echo complete
|
||||
exit 0
|
||||
Reference in New Issue
Block a user