mirror of
https://github.com/zoriya/Kyoo.git
synced 2025-07-09 03:04:20 -04:00
Allowing relative paths
This commit is contained in:
parent
95a7efa71e
commit
6c2410d9a9
@ -87,14 +87,12 @@ namespace Kyoo.Controllers
|
|||||||
|
|
||||||
Pkcs12Store store = new Pkcs12StoreBuilder().Build();
|
Pkcs12Store store = new Pkcs12StoreBuilder().Build();
|
||||||
store.SetKeyEntry("Kyoo_key", new AsymmetricKeyEntry(subjectKeyPair.Private), new [] {new X509CertificateEntry(bouncyCert)});
|
store.SetKeyEntry("Kyoo_key", new AsymmetricKeyEntry(subjectKeyPair.Private), new [] {new X509CertificateEntry(bouncyCert)});
|
||||||
|
|
||||||
using (MemoryStream pfxStream = new MemoryStream())
|
using MemoryStream pfxStream = new MemoryStream();
|
||||||
{
|
store.Save(pfxStream, password.ToCharArray(), random);
|
||||||
store.Save(pfxStream, password.ToCharArray(), random);
|
certificate = new X509Certificate2(pfxStream.ToArray(), password, X509KeyStorageFlags.Exportable);
|
||||||
certificate = new X509Certificate2(pfxStream.ToArray(), password, X509KeyStorageFlags.Exportable);
|
using FileStream fileStream = File.OpenWrite(file);
|
||||||
using FileStream fileStream = File.OpenWrite(file);
|
pfxStream.WriteTo(fileStream);
|
||||||
pfxStream.WriteTo(fileStream);
|
|
||||||
}
|
|
||||||
return certificate;
|
return certificate;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -50,7 +50,7 @@
|
|||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Content Remove="$(SpaRoot)**" />
|
<Content Remove="$(SpaRoot)**" />
|
||||||
<None Include="$(SpaRoot)**" Exclude="$(SpaRoot)node_modules\**" />
|
<None Include="$(SpaRoot)**" Exclude="$(SpaRoot)node_modules/**" />
|
||||||
<StaticFiles Include="$(SpaRoot)static/**" />
|
<StaticFiles Include="$(SpaRoot)static/**" />
|
||||||
<LoginFiles Include="$(LoginRoot)**" />
|
<LoginFiles Include="$(LoginRoot)**" />
|
||||||
<StaticFiles Include="Views/Login/material-icons.css" />
|
<StaticFiles Include="Views/Login/material-icons.css" />
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
using System;
|
using System;
|
||||||
|
using System.IO;
|
||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
using IdentityServer4.Services;
|
using IdentityServer4.Services;
|
||||||
using Kyoo.Api;
|
using Kyoo.Api;
|
||||||
@ -37,7 +38,7 @@ namespace Kyoo
|
|||||||
{
|
{
|
||||||
services.AddSpaStaticFiles(configuration =>
|
services.AddSpaStaticFiles(configuration =>
|
||||||
{
|
{
|
||||||
configuration.RootPath = "wwwroot";
|
configuration.RootPath = Path.Join(AppDomain.CurrentDomain.BaseDirectory, "wwwroot");
|
||||||
});
|
});
|
||||||
|
|
||||||
services.AddControllers()
|
services.AddControllers()
|
||||||
@ -192,7 +193,7 @@ namespace Kyoo
|
|||||||
|
|
||||||
app.UseSpa(spa =>
|
app.UseSpa(spa =>
|
||||||
{
|
{
|
||||||
spa.Options.SourcePath = "Views/WebClient";
|
spa.Options.SourcePath = Path.Join(AppDomain.CurrentDomain.BaseDirectory, "Views/WebClient");
|
||||||
|
|
||||||
if (env.IsDevelopment())
|
if (env.IsDevelopment())
|
||||||
{
|
{
|
||||||
|
5
install/aur/.gitignore
vendored
Normal file
5
install/aur/.gitignore
vendored
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
Kyoo/
|
||||||
|
src/
|
||||||
|
pkg/
|
||||||
|
kyoo-1.0.0-1-x86_64.pkg.tar.zst
|
||||||
|
|
@ -31,7 +31,9 @@ build() {
|
|||||||
|
|
||||||
package() {
|
package() {
|
||||||
mkdir -p "$pkgdir/usr/lib"
|
mkdir -p "$pkgdir/usr/lib"
|
||||||
|
mkdir -p "$pkgdir/var/lib/kyoo"
|
||||||
cp -r --no-preserve ownership "$srcdir/output" "$pkgdir/usr/lib/kyoo"
|
cp -r --no-preserve ownership "$srcdir/output" "$pkgdir/usr/lib/kyoo"
|
||||||
|
mv "$pkgdir/usr/lib/kyoo/appsettings.json" "$pkgdir/var/lib/kyoo/"
|
||||||
install -Dm 644 kyoo.service -t "$pkgdir/usr/lib/systemd/system/"
|
install -Dm 644 kyoo.service -t "$pkgdir/usr/lib/systemd/system/"
|
||||||
install -Dm 644 kyoo.sysusers "$pkgdir/usr/lib/sysusers.d/kyoo.conf"
|
install -Dm 644 kyoo.sysusers "$pkgdir/usr/lib/sysusers.d/kyoo.conf"
|
||||||
}
|
}
|
||||||
|
@ -4,8 +4,7 @@ After=network.target
|
|||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
User=kyoo
|
User=kyoo
|
||||||
WorkingDirectory=/usr/lib/kyoo
|
ExecStart=/usr/lib/kyoo/Kyoo /var/lib/kyoo
|
||||||
ExecStart=/usr/bin/dotnet kyoo.dll
|
|
||||||
Restart=on-abort
|
Restart=on-abort
|
||||||
TimeoutSec=20
|
TimeoutSec=20
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user