Files

16 lines
685 B
Bash

#!/bin/bash
mkdir /config/qBittorrent/cert/
cd /config/qBittorrent/cert/
echo ""
echo ""
echo "Write the nextcloud's URL to the COMMON NAME!"
echo "Leave the other fields blank"
echo ""
echo -n "Press ENTER to countinue..."
read x
openssl req -new -x509 -nodes -out server.crt -keyout server.key
sed -i "s/'WebUI\HTTPS\CertificatePath=.*'/'WebUI\HTTPS\CertificatePath=/config/qBittorrent/cert/server.crt'/g" /config/qBittorrent/qBittorrent.conf
sed -i "s/'WebUI\HTTPS\KeyPath=.*'/'WebUI\HTTPS\KeyPath=/config/qBittorrent/cert/server.key'/g" /config/qBittorrent/qBittorrent.conf
sed -i "s/'WebUI\HTTPS\Enabled=false'/'WebUI\HTTPS\Enabled=true'/g" /config/qBittorrent/qBittorrent.conf