Advertisement
Oliinyk

vibe-coded ai-written Pterodactyl panel Egg for StirlingPDF service

Jul 6th, 2025 (edited)
394
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
JSON 6.75 KB | Help | 0 0
  1. {
  2.   "_comment": "DO NOT EDIT: FILE GENERATED AUTOMATICALLY BY PTERODACTYL PANEL - PTERODACTYL.IO",
  3.   "meta": {
  4.     "version": "PTDL_v2",
  5.     "update_url": null
  6.   },
  7.   "exported_at": "2025-07-06T11:01:48+00:00",
  8.   "name": "Stirling-PDF",
  9.   "author": "[email protected]",
  10.   "description": "Stirling-PDF is a robust, locally hosted web-based PDF manipulation tool. It enables you to carry out various operations on PDF files, including splitting, merging, converting, reorganizing, adding images, rotating, compressing, and more.",
  11.   "features": [
  12.     "java_version"
  13.   ],
  14.   "docker_images": {
  15.     "Java 21": "ghcr.io/pterodactyl/yolks:java_21",
  16.     "Java 17": "ghcr.io/pterodactyl/yolks:java_17"
  17.   },
  18.   "file_denylist": [],
  19.   "startup": "java -Xms{{SERVER_MEMORY}}M -Xmx{{SERVER_MEMORY}}M -Dfile.encoding=UTF-8 -jar {{JARFILE}}",
  20.   "config": {
  21.     "files": "{\r\n    \"application.properties\": {\r\n        \"parser\": \"properties\",\r\n        \"find\": {\r\n            \"server.port\": \"{{server.build.default.port}}\",\r\n            \"server.address\": \"0.0.0.0\"\r\n        }\r\n    }\r\n}",
  22.     "startup": "{\r\n    \"done\": \"Started StirlingPdfApplication\"\r\n}",
  23.     "logs": "{}",
  24.     "stop": "^C"
  25.   },
  26.   "scripts": {
  27.     "installation": {
  28.       "script": "#!/bin/bash\r\n# Stirling-PDF Installation Script\r\n#\r\n# Server Files: /mnt/server\r\n\r\ncd /mnt/server\r\n\r\n# Make sure we have basic tools\r\necho \"Installing dependencies...\"\r\napt update\r\napt install -y curl wget jq\r\n\r\n# Determine download URL\r\nif [ -n \"${DOWNLOAD_URL}\" ] && [ \"${DOWNLOAD_URL}\" != \"\" ]; then\r\n    echo \"Using provided download URL: ${DOWNLOAD_URL}\"\r\n    ACTUAL_DOWNLOAD_URL=\"${DOWNLOAD_URL}\"\r\nelse\r\n    # Get latest release from GitHub API\r\n    echo \"Fetching latest release information...\"\r\n    LATEST_RELEASE=$(curl -s \"https://api.github.com/repos/Stirling-Tools/Stirling-PDF/releases/latest\")\r\n    \r\n    if [ \"${VERSION}\" = \"latest\" ] || [ -z \"${VERSION}\" ]; then\r\n        echo \"Getting latest version...\"\r\n        VERSION=$(echo \"${LATEST_RELEASE}\" | jq -r '.tag_name' | sed 's/^v//')\r\n        echo \"Latest version: ${VERSION}\"\r\n    fi\r\n    \r\n    # Determine which JAR to download based on ENABLE_LOGIN\r\n    if [ \"${ENABLE_LOGIN}\" = \"true\" ]; then\r\n        JAR_NAME=\"Stirling-PDF-with-login.jar\"\r\n        echo \"Downloading Stirling-PDF with login support...\"\r\n    else\r\n        JAR_NAME=\"Stirling-PDF.jar\"\r\n        echo \"Downloading standard Stirling-PDF...\"\r\n    fi\r\n    \r\n    ACTUAL_DOWNLOAD_URL=\"https://github.com/Stirling-Tools/Stirling-PDF/releases/download/v${VERSION}/${JAR_NAME}\"\r\nfi\r\n\r\necho \"Download URL: ${ACTUAL_DOWNLOAD_URL}\"\r\necho \"Target file: ${JARFILE}\"\r\n\r\n# Download the JAR file\r\necho \"Downloading Stirling-PDF...\"\r\nif [ -f \"${JARFILE}\" ]; then\r\n    echo \"Backing up existing JAR file...\"\r\n    mv \"${JARFILE}\" \"${JARFILE}.bak\"\r\nfi\r\n\r\ncurl -L -o \"${JARFILE}\" \"${ACTUAL_DOWNLOAD_URL}\"\r\n\r\nif [ ! -f \"${JARFILE}\" ]; then\r\n    echo \"ERROR: Failed to download JAR file!\"\r\n    if [ -f \"${JARFILE}.bak\" ]; then\r\n        echo \"Restoring backup...\"\r\n        mv \"${JARFILE}.bak\" \"${JARFILE}\"\r\n    fi\r\n    exit 1\r\nfi\r\n\r\n# Verify the JAR file\r\necho \"Verifying downloaded file...\"\r\nfile_size=$(stat -c%s \"${JARFILE}\")\r\nif [ \"$file_size\" -lt 1000000 ]; then\r\n    echo \"ERROR: Downloaded file seems too small (${file_size} bytes). Download may have failed.\"\r\n    cat \"${JARFILE}\"\r\n    exit 1\r\nfi\r\n\r\necho \"Download completed successfully!\"\r\necho \"File size: ${file_size} bytes\"\r\n\r\n# Create application.properties if it doesn't exist\r\nif [ ! -f \"application.properties\" ]; then\r\n    echo \"Creating default application.properties...\"\r\n    cat > application.properties << EOF\r\nserver.port=8080\r\nserver.address=0.0.0.0\r\nlogging.level.stirling=INFO\r\nlogging.level.org.springframework.web=INFO\r\nEOF\r\nfi\r\n\r\n# Create necessary directories\r\nmkdir -p configs customFiles logs\r\n\r\necho \"Installation completed successfully!\"\r\necho \"JAR file: ${JARFILE}\"\r\necho \"Ready to start Stirling-PDF!\"",
  29.       "container": "ghcr.io/pterodactyl/installers:debian",
  30.       "entrypoint": "bash"
  31.     }
  32.   },
  33.   "variables": [
  34.     {
  35.       "name": "JAR File Name",
  36.       "description": "The name of the Stirling-PDF JAR file.",
  37.       "env_variable": "JARFILE",
  38.       "default_value": "Stirling-PDF.jar",
  39.       "user_viewable": true,
  40.       "user_editable": true,
  41.       "rules": "required|regex:/^([\\w\\d._-]+)(\\.jar)$/",
  42.       "field_type": "text"
  43.     },
  44.     {
  45.       "name": "Version",
  46.       "description": "The version of Stirling-PDF to install. Use 'latest' for the most recent version.",
  47.       "env_variable": "VERSION",
  48.       "default_value": "latest",
  49.       "user_viewable": true,
  50.       "user_editable": true,
  51.       "rules": "required|string|max:20",
  52.       "field_type": "text"
  53.     },
  54.     {
  55.       "name": "Download URL",
  56.       "description": "Direct download URL for a specific Stirling-PDF JAR file. Leave empty to use automatic version detection.",
  57.       "env_variable": "DOWNLOAD_URL",
  58.       "default_value": "",
  59.       "user_viewable": false,
  60.       "user_editable": false,
  61.       "rules": "nullable|url",
  62.       "field_type": "text"
  63.     },
  64.     {
  65.       "name": "Enable Login Support",
  66.       "description": "Enable this to download the version with login/authentication support.",
  67.       "env_variable": "ENABLE_LOGIN",
  68.       "default_value": "false",
  69.       "user_viewable": true,
  70.       "user_editable": true,
  71.       "rules": "required|string|in:true,false",
  72.       "field_type": "text"
  73.     },
  74.     {
  75.       "name": "Security Features",
  76.       "description": "Enable Docker security features. Set to 'false' for easier setup, 'true' for production.",
  77.       "env_variable": "DOCKER_ENABLE_SECURITY",
  78.       "default_value": "false",
  79.       "user_viewable": true,
  80.       "user_editable": true,
  81.       "rules": "required|string|in:true,false",
  82.       "field_type": "text"
  83.     },
  84.     {
  85.       "name": "Language",
  86.       "description": "Set the default language (e.g., en_GB, de_DE, fr_FR, es_ES, etc.)",
  87.       "env_variable": "LANGS",
  88.       "default_value": "en_GB",
  89.       "user_viewable": true,
  90.       "user_editable": true,
  91.       "rules": "required|string|max:10",
  92.       "field_type": "text"
  93.     },
  94.     {
  95.       "name": "Advanced Features",
  96.       "description": "Install book and advanced HTML operations. Set to 'false' for lighter installation.",
  97.       "env_variable": "INSTALL_BOOK_AND_ADVANCED_HTML_OPS",
  98.       "default_value": "false",
  99.       "user_viewable": true,
  100.       "user_editable": true,
  101.       "rules": "required|string|in:true,false",
  102.       "field_type": "text"
  103.     }
  104.   ]
  105. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement