user
This commit is contained in:
@@ -6,6 +6,7 @@ let
|
||||
tag = pkgs.jellyfin.version;
|
||||
contents = [ pkgs.cacert ];
|
||||
config = {
|
||||
User = "1000:1000";
|
||||
Entrypoint = [ "${pkgs.jellyfin}/bin/jellyfin" ];
|
||||
ExposedPorts = { "8096/tcp" = { }; };
|
||||
Env = [
|
||||
@@ -84,6 +85,7 @@ in {
|
||||
exit 0
|
||||
fi
|
||||
|
||||
#USE CONFIGURATION ENDPOINT
|
||||
if ! ${pkgs.curl}/bin/curl -sSf -X POST "$JELLYFIN_URL/Startup/Configuration" \
|
||||
-H "Content-Type: application/json" \
|
||||
-d '{"ServerName":"Flix","UICulture":"en-US","MetadataCountryCode":"US","PreferredMetadataLanguage":"en"}'; then
|
||||
@@ -91,13 +93,12 @@ in {
|
||||
exit 1
|
||||
fi
|
||||
|
||||
#USE AUTH ENDPOINT
|
||||
SETUP_USER_PAYLOAD=$(${pkgs.jq}/bin/jq -n \
|
||||
--arg name "$DEFAULT_ADMIN_USERNAME" \
|
||||
--arg pass "$DEFAULT_ADMIN_PASSWORD" \
|
||||
'{"Name": $name, "Password": $pass}')
|
||||
|
||||
echo "Payload to be sent to /Startup/User: $SETUP_USER_PAYLOAD"
|
||||
|
||||
if ! ${pkgs.curl}/bin/curl -sSf -X POST "$JELLYFIN_URL/Startup/User" \
|
||||
-H 'accept: */*' \
|
||||
-H "Content-Type: application/json" \
|
||||
|
||||
Reference in New Issue
Block a user