remove default certificate and generate new one automatically
This commit is contained in:
@@ -0,0 +1 @@
|
||||
*.p12
|
||||
@@ -38,7 +38,10 @@ TV_IP=192.168.0.10 ./install-jellyfin.sh
|
||||
|
||||
### Jellyfin - the custom way
|
||||
|
||||
1. (Optional) Create your custom tizen certificate (see details below).
|
||||
1. Create your custom tizen certificate. In order to change certificate details you may edit the .env.default file.
|
||||
```
|
||||
./scripts/extract-cert.sh
|
||||
```
|
||||
|
||||
2. Build the image providing required build arguments.
|
||||
```
|
||||
@@ -59,13 +62,13 @@ TV_IP=192.168.0.10 ./install-jellyfin.sh
|
||||
docker run -it --rm --entrypoint "/bin/bash" jellyfin-tizen-installer
|
||||
```
|
||||
|
||||
### Cert
|
||||
### Certificate
|
||||
|
||||
Repository includes dummy certificate to allow reinstalling the app without removing it first.
|
||||
You may use the provided one or generate your own. Here's how:
|
||||
To allow reinstalling the app without removing it first you need to reuse the Tizen certificate.
|
||||
You may generate your own by running:
|
||||
|
||||
```
|
||||
./extract-cert.sh
|
||||
./scripts/extract-cert.sh
|
||||
```
|
||||
|
||||
*Note:* you may overwrite default certificate data by amending values in `.env.default`.
|
||||
|
||||
Binary file not shown.
+11
-1
@@ -1,6 +1,6 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -ex
|
||||
set -e
|
||||
|
||||
if [ -z "$TV_IP" ]; then
|
||||
echo "TV_IP variable is required!"
|
||||
@@ -9,6 +9,14 @@ fi
|
||||
|
||||
source .env.default
|
||||
|
||||
if [ ! -f "cert/${CERT_FILENAME}.p12" ]; then
|
||||
echo "Creating new Tizen certificate"
|
||||
./scripts/extract-cert.sh
|
||||
else
|
||||
echo "Using cert/${CERT_FILENAME}.p12 as Tizen certificate"
|
||||
fi
|
||||
|
||||
echo "Building docker image"
|
||||
docker build \
|
||||
--build-arg CERT_PASSWORD="$CERT_PASSWORD" \
|
||||
--build-arg CERT_NAME="$CERT_NAME" \
|
||||
@@ -16,4 +24,6 @@ docker build \
|
||||
--build-arg JELLYFIN_BRANCH="$JELLYFIN_BRANCH" \
|
||||
-t jellyfin-tizen-installer .
|
||||
|
||||
echo "Installing Jellyfin"
|
||||
docker run --rm --env TV_IP="$TV_IP" jellyfin-tizen-installer
|
||||
|
||||
|
||||
@@ -1,9 +1,21 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -ex
|
||||
set -e
|
||||
|
||||
source .env.default
|
||||
|
||||
if [ -f "cert/${CERT_FILENAME}.p12" ]; then
|
||||
read -rp "Certificate file will be overwritten. Do you want to proceed? (y/n) " yn
|
||||
case $yn in
|
||||
y ) echo Continuing...;;
|
||||
n ) echo Exiting...;
|
||||
exit;;
|
||||
* ) echo Invalid choice;
|
||||
exit 1;;
|
||||
esac
|
||||
fi
|
||||
|
||||
echo "Building docker image for certificate"
|
||||
docker build \
|
||||
--build-arg CERT_ALIAS="$CERT_ALIAS" \
|
||||
--build-arg CERT_PASSWORD="$CERT_PASSWORD" \
|
||||
@@ -12,6 +24,11 @@ docker build \
|
||||
--build-arg CERT_FILENAME="$CERT_FILENAME" \
|
||||
-t tizen-cert cert
|
||||
|
||||
echo "Starting docker container"
|
||||
docker run -dit --rm --name tizen-cert tizen-cert
|
||||
|
||||
echo "Copying certificate file to cert/${CERT_FILENAME}.p12"
|
||||
docker cp tizen-cert:/home/jellyfin/tizen-studio-data/keystore/author/"$CERT_FILENAME".p12 cert/"$CERT_FILENAME".p12
|
||||
|
||||
echo "Discarding container"
|
||||
docker stop tizen-cert
|
||||
Reference in New Issue
Block a user