Re-instate the service-install and service-remove bat files.
This commit is contained in:
parent
ed10c630ee
commit
63b04bbe33
7 changed files with 851 additions and 940 deletions
15
README.md
15
README.md
|
|
@ -14,7 +14,7 @@ This is a web interface to manage your torrents on Real-Debrid. It supports the
|
|||
|
||||
## Docker Setup
|
||||
|
||||
You can run the docker container on Windows, Linux. To get started either use *Docker Run* or *Docker Compose*.
|
||||
You can run the docker container on Windows, Linux. To get started either use _Docker Run_ or _Docker Compose_.
|
||||
|
||||
### Docker Run
|
||||
|
||||
|
|
@ -61,6 +61,15 @@ docker-compose up -d
|
|||
|
||||
Replace the paths in `volumes` as in the above step.
|
||||
|
||||
## Windows Service
|
||||
|
||||
Instead of running in Docker you can install it as a service in Windows or Linux (not tested).
|
||||
|
||||
1. Get the latest zip file from the Releases page and extract it to your host.
|
||||
1. Open the `appsettings.json` file and replace the `LogLevel` `Path` to a path on your host.
|
||||
1. In `appsettings.json` replace the `Database` `Path` to a path on your host.
|
||||
1. When using Windows paths, make sure to escape the slashes. For example: `D:\\RdtClient\\db\\rdtclient.db`
|
||||
|
||||
## Setup
|
||||
|
||||
### First Login
|
||||
|
|
@ -68,8 +77,8 @@ Replace the paths in `volumes` as in the above step.
|
|||
1. Browse to [http://127.0.0.1:6500](http://127.0.0.1:6500) (or the path of your server).
|
||||
1. The very first credentials you enter in will be remembered for future logins.
|
||||
1. Click on `Settings` on the top and enter your Real-Debrid API key (found here: [https://real-debrid.com/apitoken](https://real-debrid.com/apitoken).
|
||||
1. If you are using docker then the `Download path` setting needs to be the same as in your docker file mapping. By default this is `/data/downloads`
|
||||
1. Same goes for `Mapped path`, but this is the destination path from your docker mapping. This is a path on your host.
|
||||
1. If you are using docker then the `Download path` setting needs to be the same as in your docker file mapping. By default this is `/data/downloads`. If you are using Windows, this is a path on your host.
|
||||
1. Same goes for `Mapped path`, but this is the destination path from your docker mapping. This is a path on your host. For Windows, this will most likely be the same as the `Download path`.
|
||||
1. Save your settings.
|
||||
|
||||
### Download Clients
|
||||
|
|
|
|||
1679
client/package-lock.json
generated
1679
client/package-lock.json
generated
File diff suppressed because it is too large
Load diff
20
dotnet-publish.ps1
Normal file
20
dotnet-publish.ps1
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
cd client
|
||||
npm install
|
||||
ng build --prod --output-path=..\server\RdtClient.Web\wwwroot
|
||||
|
||||
cd ..
|
||||
cd server
|
||||
dotnet build -c Release
|
||||
dotnet publish -c Release -o ..\out
|
||||
|
||||
cd ..
|
||||
cd out
|
||||
|
||||
Add-Type -Assembly System.IO.Compression.FileSystem
|
||||
$compressionLevel = [System.IO.Compression.CompressionLevel]::Optimal
|
||||
$location = Get-Location
|
||||
[System.IO.Compression.ZipFile]::CreateFromDirectory($location, "$location/../release.zip", $compressionLevel, $false)
|
||||
|
||||
cd ..
|
||||
|
||||
Remove-Item -Path out -Recurse -Force
|
||||
|
|
@ -4,8 +4,23 @@
|
|||
<TargetFramework>net5.0</TargetFramework>
|
||||
<OutputType>Exe</OutputType>
|
||||
<UserSecretsId>94c24cba-f03f-4453-a671-3640b517c573</UserSecretsId>
|
||||
<Version>1.5.0</Version>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<None Remove="service-install.bat" />
|
||||
<None Remove="service-remove.bat" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Content Include="service-install.bat">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Include="service-remove.bat">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</Content>
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.AspNetCore.Mvc.NewtonsoftJson" Version="5.0.2" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.SpaServices.Extensions" Version="5.0.2" />
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"Logging": {
|
||||
"LogLevel": {
|
||||
"Default": "Warning",
|
||||
"Default": "Information",
|
||||
"Microsoft": "Warning",
|
||||
"Microsoft.Hosting.Lifetime": "Warning",
|
||||
"Hangfire": "Warning"
|
||||
|
|
|
|||
30
server/RdtClient.Web/service-install.bat
Normal file
30
server/RdtClient.Web/service-install.bat
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
@echo off
|
||||
set installpath=%~dp0
|
||||
NET SESSION >nul 2>&1
|
||||
IF %ERRORLEVEL% EQU 0 (
|
||||
echo adding firewall rules...
|
||||
netsh.exe advfirewall firewall add rule name="RealDebridClient" dir=in action=allow program="%installpath%RdtClient.Web.exe" enable=yes > nul
|
||||
echo installing service...
|
||||
sc create RealDebridClient binPath="%installpath%RdtClient.Web.exe" start=auto
|
||||
timeout /t 5 /nobreak > NUL
|
||||
net start RealDebridClient
|
||||
) ELSE (
|
||||
echo ######## ######## ######## ####### ########
|
||||
echo ## ## ## ## ## ## ## ## ##
|
||||
echo ## ## ## ## ## ## ## ## ##
|
||||
echo ###### ######## ######## ## ## ########
|
||||
echo ## ## ## ## ## ## ## ## ##
|
||||
echo ## ## ## ## ## ## ## ## ##
|
||||
echo ######## ## ## ## ## ####### ## ##
|
||||
echo.
|
||||
echo.
|
||||
echo ####### ERROR: ADMINISTRATOR PRIVILEGES REQUIRED #########
|
||||
echo This script must be run as administrator to work properly!
|
||||
echo If you're seeing this after clicking on a start menu icon,
|
||||
echo then right click on the shortcut and select "Run As Administrator".
|
||||
echo ##########################################################
|
||||
echo.
|
||||
PAUSE
|
||||
EXIT /B 1
|
||||
)
|
||||
@echo ON
|
||||
30
server/RdtClient.Web/service-remove.bat
Normal file
30
server/RdtClient.Web/service-remove.bat
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
@echo off
|
||||
set installpath=%~dp0
|
||||
NET SESSION >nul 2>&1
|
||||
IF %ERRORLEVEL% EQU 0 (
|
||||
echo removing firewall rules...
|
||||
netsh.exe advfirewall firewall remove rule name="RealDebridClient" > nul
|
||||
echo removing service...
|
||||
net stop RealDebridClient
|
||||
timeout /t 5 /nobreak > NUL
|
||||
sc delete RealDebridClient
|
||||
) ELSE (
|
||||
echo ######## ######## ######## ####### ########
|
||||
echo ## ## ## ## ## ## ## ## ##
|
||||
echo ## ## ## ## ## ## ## ## ##
|
||||
echo ###### ######## ######## ## ## ########
|
||||
echo ## ## ## ## ## ## ## ## ##
|
||||
echo ## ## ## ## ## ## ## ## ##
|
||||
echo ######## ## ## ## ## ####### ## ##
|
||||
echo.
|
||||
echo.
|
||||
echo ####### ERROR: ADMINISTRATOR PRIVILEGES REQUIRED #########
|
||||
echo This script must be run as administrator to work properly!
|
||||
echo If you're seeing this after clicking on a start menu icon,
|
||||
echo then right click on the shortcut and select "Run As Administrator".
|
||||
echo ##########################################################
|
||||
echo.
|
||||
PAUSE
|
||||
EXIT /B 1
|
||||
)
|
||||
@echo ON
|
||||
Loading…
Reference in a new issue