Skip to content

Commit

Permalink
Move purchased license key to environment variable
Browse files Browse the repository at this point in the history
- previous method of using files proved unreliable
- should help fix #134
  • Loading branch information
rix committed Jan 24, 2025
1 parent cc03e37 commit 05525b9
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 33 deletions.
Binary file removed .github/screenshots/configdirectory.png
Binary file not shown.
Binary file removed .github/screenshots/makemkvkey.png
Binary file not shown.
Binary file removed .github/screenshots/sudormenteryourkey.png
Binary file not shown.
30 changes: 12 additions & 18 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,17 +51,19 @@ docker run -d \
```

Some systems are not able to pass through optical drives without this flag
`--privileged`
```
--privileged
```

#### Configuring the web UI for logs

Add these optional parameters when running the container
````
-e /ripper-ui=OPTIONAL_WEB_UI_PATH_PREFIX \
-e myusername=OPTIONAL_WEB_UI_USERNAME \
-e strongpassword=OPTIONAL_WEB_UI_PASSWORD \
```
-e OPTIONAL_WEB_UI_PATH_PREFIX=/ripper-ui \
-e OPTIONAL_WEB_UI_USERNAME=myusername \
-e OPTIONAL_WEB_UI_PASSWORD=strongpassword \
-e DEBUGTOWEB=true \
````
```

`OPTIONAL_WEB_UI_USERNAME ` and `OPTIONAL_WEB_UI_PASSWORD ` both need to be set to enable http basic auth for the web UI.
`OPTIONAL_WEB_UI_PATH_PREFIX ` can be used to set a path prefix (e.g. `/ripper-ui`). This is useful when you are running multiple services at one domain.
Expand All @@ -75,18 +77,10 @@ launch. Without a purchased license key Ripper may stop running at any time.

#### If you have purchased a license key to MakeMKV/Ripper:

1) after starting the container, go into the config directory you created, edit the file
called `enter-your-key-then-rename-to.settings.conf`, and add your key between the
quotes `app_Key = "`**[ENTER KEY HERE]**`"` then save and rename the file to settings.conf

![makemkv license](https://raw.githubusercontent.com/rix1337/docker-ripper/main/.github/screenshots/makemkvkey.png)

2) Remove the remaining file `enter-your-key-then-rename-to.settings.conf`
![sudo rm enter your key](https://raw.githubusercontent.com/rix1337/docker-ripper/main/.github/screenshots/sudormenteryourkey.png)

3) At this point your config directory should look like this:
![config directory](https://raw.githubusercontent.com/rix1337/docker-ripper/main/.github/screenshots/configdirectory.png)

Add your purchased license key to the docker environment variables with the as `KEY`
```
-e KEY=T-eX4mpl3FoQCIORraCfuH3X@qEyMjXXCduqtd8xNt4rjNRZf3Y2BRrIlJqxODbBo@KTW
```
## Docker compose

Check the device mount points and optional settings before you run the container.
Expand Down
1 change: 1 addition & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ services:
- MINIMUMLENGTH=600 # optional - minimum length of the disc in seconds - if the disc or chapter is shorter than this, it will not be ripped
- FILEUSER=nobody # optional - defines the user ownership of created files
- FILEGROUP=users # optional - defines the group ownership of created files
# - KEY=T-eX4mpl3FoQCIORraCfuH3X@qEyMjXXCduqtd8xNt4rjNRZf3Y2BRrIlJqxODbBo@KTW # optional - an officially purchased MakeMKV license key
# - PREFIX=OPTIONAL_WEB_UI_PATH_PREFIX # optional - path prefix for the integrated web ui when commented out or set to /, the web ui will be at the root of the server
# - USER=OPTIONAL_WEB_UI_USERNAME # optional - user name for the integrated web ui (requires PASS to be set) - if not set, the web ui will not require authentication
# - PASS=OPTIONAL_WEB_UI_PASSWORD # optional - password for the integrated web ui (requires USER to be set) - if not set, the web ui will not require authentication
Expand Down
21 changes: 6 additions & 15 deletions root/etc/my_init.d/ripper.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,25 +9,16 @@ if [[ ! -f /config/ripper.sh ]]; then
cp /ripper/ripper.sh /config/ripper.sh
fi

# copy default settings
if [[ ! -f /config/settings.conf ]] && [[ ! -f /config/enter-your-key-then-rename-to.settings.conf ]]; then
cp -f /ripper/settings.conf /config/
mv /config/settings.conf /config/enter-your-key-then-rename-to.settings.conf
fi

# fetching MakeMKV beta key
KEY=$(curl --silent 'https://forum.makemkv.com/forum/viewtopic.php?f=5&t=1053' | grep -oP 'T-[\w\d@]{66}')

# move settings.conf, if found
# key setup logic
mkdir -p /root/.MakeMKV
if [[ -f /config/settings.conf ]]; then
echo "Found settings.conf. Replacing beta key file."
cp -f /config/settings.conf /root/.MakeMKV/
elif [ -n $KEY ]; then
if [ -n "$KEY" ]; then
echo "Using MakeMKV key from ENVIRONMENT variable \$KEY: $KEY"
else
KEY=$(curl --silent 'https://forum.makemkv.com/forum/viewtopic.php?f=5&t=1053' | grep -oP 'T-[\w\d@]{66}')
echo "Using MakeMKV beta key: $KEY"
echo app_Key = "\"$KEY"\" >/root/.MakeMKV/settings.conf
fi

echo app_Key = "\"$KEY"\" >/root/.MakeMKV/settings.conf
makemkvcon reg

# move abcde.conf, if found
Expand Down

0 comments on commit 05525b9

Please sign in to comment.