{"id":315,"date":"2025-07-16T10:53:20","date_gmt":"2025-07-16T17:53:20","guid":{"rendered":"https:\/\/www.cmsws.com\/blog\/?p=315"},"modified":"2025-07-16T10:53:20","modified_gmt":"2025-07-16T17:53:20","slug":"create-tinydns-hook-script-for-use-with-acme-sh","status":"publish","type":"post","link":"https:\/\/www.cmsws.com\/blog\/create-tinydns-hook-script-for-use-with-acme-sh\/","title":{"rendered":"Create TinyDNS &#8220;hook&#8221; script for use with acme.sh"},"content":{"rendered":"\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Add_%E2%80%9Chook%E2%80%9D_processing_file_for_acmesh\"><\/span>Add &#8220;hook&#8221; processing file for acme.sh<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Create_the_file_acmeshdns_tinydnssh\"><\/span>Create the file ~\/.acme.sh\/dns_tinydns.sh<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p>Add the following to this file:<\/p><div id=\"ez-toc-container\" class=\"ez-toc-v2_0_85 ez-toc-wrap-right counter-hierarchy ez-toc-counter ez-toc-grey ez-toc-container-direction\">\n<div class=\"ez-toc-title-container\">\n<span class=\"ez-toc-title-toggle\"><\/span><\/div>\n<nav><ul class='ez-toc-list ez-toc-list-level-1 ' ><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/www.cmsws.com\/blog\/create-tinydns-hook-script-for-use-with-acme-sh\/#Add_%E2%80%9Chook%E2%80%9D_processing_file_for_acmesh\" >Add &#8220;hook&#8221; processing file for acme.sh<\/a><ul class='ez-toc-list-level-3' ><li class='ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/www.cmsws.com\/blog\/create-tinydns-hook-script-for-use-with-acme-sh\/#Create_the_file_acmeshdns_tinydnssh\" >Create the file ~\/.acme.sh\/dns_tinydns.sh<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/www.cmsws.com\/blog\/create-tinydns-hook-script-for-use-with-acme-sh\/#Set_file_as_executable\" >Set file as executable<\/a><\/li><\/ul><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-4\" href=\"https:\/\/www.cmsws.com\/blog\/create-tinydns-hook-script-for-use-with-acme-sh\/#Create_tinydns_update_script_%E2%80%98usrlocalbinupdate_tinydns_txtsh\" >Create tinydns update script &#8216;\/usr\/local\/bin\/update_tinydns_txt.sh&#8217;<\/a><ul class='ez-toc-list-level-3' ><li class='ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-5\" href=\"https:\/\/www.cmsws.com\/blog\/create-tinydns-hook-script-for-use-with-acme-sh\/#Set_file_as_executable-2\" >Set file as executable<\/a><\/li><\/ul><\/li><\/ul><\/nav><\/div>\n\n\n\n\n<pre class=\"wp-block-code\"><code>#!\/bin\/bash\n# acme.sh custom DNS API hook for TinyDNS\n\n# Path to your update script\nTINYSCRIPT=\"\/usr\/local\/bin\/update_tinydns_txt.sh\"\n\ndns_tinydns_add() {\n    fulldomain=\"$1\" # e.g. _acme-challenge.example.com\n    txtvalue=\"$2\" # e.g. the ACME challenge token\n\n    _debug \"dns_tinydns_add: $fulldomain = $txtvalue\"\n\n    \"$TINYSCRIPT\" \"$txtvalue\" \"$fulldomain\" || return 1\n\n    return 0\n}\n\ndns_tinydns_rm() {\n    fulldomain=\"$1\"\n    txtvalue=\"$2\"\n\n    _debug \"dns_tinydns_rm: $fulldomain (value $txtvalue)\"\n\n    # Optional: implement record removal here\n    return 0\n}<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Set_file_as_executable\"><\/span>Set file as executable<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>chmod +x ~\/.acme.sh\/dns_tinydns.sh<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Create_tinydns_update_script_%E2%80%98usrlocalbinupdate_tinydns_txtsh\"><\/span>Create tinydns update script &#8216;\/usr\/local\/bin\/update_tinydns_txt.sh&#8217;<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>Add the following to this file:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>#!\/bin\/bash\n# Must be run as root\nif &#91;&#91; $EUID -ne 0 ]]; then\n    echo \"This script must be run as root.\"\n    exit 1\nfi\n\n# Check arguments\nif &#91;&#91; -z \"$1\" || -z \"$2\" ]]; then\n    echo \"Usage: $0 \\\"txt-value\\\" \\\"record-name\\\"\"\n    exit 1\nfi\n\n# Input parameters\nTXT_VALUE=\"$1\"\nRECORD_NAME=\"$2\"\n\n# Paths and settings\nTINYDNS_ROOT=\"\/var\/tinydns\/root\"\nDATA_FILE=\"$TINYDNS_ROOT\/data\"\nBACKUP_DIR=\"$TINYDNS_ROOT\/backups\"\nDNSCACHE_SERVICE_NAME=\"dnscached\"\n\n# Ensure backup directory exists\nmkdir -p \"$BACKUP_DIR\"\necho \"Updating TXT record for $RECORD_NAME\"\n\n# Backup current data file\nTIMESTAMP=$(date +%Y%m%d_%H%M%S)\ncp \"$DATA_FILE\" \"$BACKUP_DIR\/data_$TIMESTAMP.bak\" || {\n    echo \"Failed to back up data file.\"\n    exit 1\n}\n\n# Backup in-place\ncp \"$DATA_FILE\" \"$DATA_FILE.bak\"\n\n# Check if record exists\nif grep -q \"^'${RECORD_NAME}:\" \"$DATA_FILE\"; then\n    # Update existing TXT record\n    sed -i -E \"s|^('${RECORD_NAME}):.*|\\1:${TXT_VALUE}:30|\" \"$DATA_FILE\"\nelse\n    # Append new TXT record\n    echo \"'${RECORD_NAME}:${TXT_VALUE}\" &gt;&gt; \"$DATA_FILE\"\nfi\n\n# Rebuild data.cdb\ncd \"$TINYDNS_ROOT\" &amp;&amp; make || {\n    echo \"make failed. Restoring original data file.\"\n    mv \"$DATA_FILE.bak\" \"$DATA_FILE\"\n    make\n    exit 1\n}\n\n# Restart dnscached service\nservice \"$DNSCACHE_SERVICE_NAME\" restart || {\n    echo \"Failed to restart $DNSCACHE_SERVICE_NAME service.\"\n    exit 1\n}\n\necho \"Successfully updated TXT record for $RECORD_NAME\"<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Set_file_as_executable-2\"><\/span>Set file as executable<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>chmod +x \/usr\/local\/bin\/update_tinydns_txt.sh<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Add &#8220;hook&#8221; processing file for acme.sh Create the file ~\/.acme.sh\/dns_tinydns.sh Add the following to this file: Set file as executable Create tinydns update script &#8216;\/usr\/local\/bin\/update_tinydns_txt.sh&#8217; Add the following to this file: Set file as executable<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-315","post","type-post","status-publish","format-standard","hentry","category-misc"],"aioseo_notices":[],"aioseo_head":"\n\t\t<!-- All in One SEO 4.9.10 - aioseo.com -->\n\t<meta name=\"description\" content=\"Add &quot;hook&quot; processing file for acme.sh Create the file ~\/.acme.sh\/dns_tinydns.sh Add the following to this file: #!\/bin\/bash # acme.sh custom DNS API hook for TinyDNS # Path to your update script TINYSCRIPT=&quot;\/usr\/local\/bin\/update_tinydns_txt.sh&quot; dns_tinydns_add() { fulldomain=&quot;$1&quot; # e.g. _acme-challenge.example.com txtvalue=&quot;$2&quot; # e.g. the ACME challenge token _debug &quot;dns_tinydns_add: $fulldomain = $txtvalue&quot; &quot;$TINYSCRIPT&quot; &quot;$txtvalue&quot; &quot;$fulldomain&quot; || return\" \/>\n\t<meta name=\"robots\" content=\"max-image-preview:large\" \/>\n\t<meta name=\"author\" content=\"Jim Lucas\"\/>\n\t<link rel=\"canonical\" href=\"https:\/\/www.cmsws.com\/blog\/create-tinydns-hook-script-for-use-with-acme-sh\/\" \/>\n\t<meta name=\"generator\" content=\"All in One SEO (AIOSEO) 4.9.10\" \/>\n\t\t<meta property=\"og:locale\" content=\"en_US\" \/>\n\t\t<meta property=\"og:site_name\" content=\"A different perspective \u203a Right, lets get on with it...\" \/>\n\t\t<meta property=\"og:type\" content=\"article\" \/>\n\t\t<meta property=\"og:title\" content=\"Create TinyDNS \u201chook\u201d script for use with acme.sh \u203a A different perspective\" \/>\n\t\t<meta property=\"og:description\" content=\"Add &quot;hook&quot; processing file for acme.sh Create the file ~\/.acme.sh\/dns_tinydns.sh Add the following to this file: #!\/bin\/bash # acme.sh custom DNS API hook for TinyDNS # Path to your update script TINYSCRIPT=&quot;\/usr\/local\/bin\/update_tinydns_txt.sh&quot; dns_tinydns_add() { fulldomain=&quot;$1&quot; # e.g. _acme-challenge.example.com txtvalue=&quot;$2&quot; # e.g. the ACME challenge token _debug &quot;dns_tinydns_add: $fulldomain = $txtvalue&quot; &quot;$TINYSCRIPT&quot; &quot;$txtvalue&quot; &quot;$fulldomain&quot; || return\" \/>\n\t\t<meta property=\"og:url\" content=\"https:\/\/www.cmsws.com\/blog\/create-tinydns-hook-script-for-use-with-acme-sh\/\" \/>\n\t\t<meta property=\"article:published_time\" content=\"2025-07-16T17:53:20+00:00\" \/>\n\t\t<meta property=\"article:modified_time\" content=\"2025-07-16T17:53:20+00:00\" \/>\n\t\t<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n\t\t<meta name=\"twitter:title\" content=\"Create TinyDNS \u201chook\u201d script for use with acme.sh \u203a A different perspective\" \/>\n\t\t<meta name=\"twitter:description\" content=\"Add &quot;hook&quot; processing file for acme.sh Create the file ~\/.acme.sh\/dns_tinydns.sh Add the following to this file: #!\/bin\/bash # acme.sh custom DNS API hook for TinyDNS # Path to your update script TINYSCRIPT=&quot;\/usr\/local\/bin\/update_tinydns_txt.sh&quot; dns_tinydns_add() { fulldomain=&quot;$1&quot; # e.g. _acme-challenge.example.com txtvalue=&quot;$2&quot; # e.g. the ACME challenge token _debug &quot;dns_tinydns_add: $fulldomain = $txtvalue&quot; &quot;$TINYSCRIPT&quot; &quot;$txtvalue&quot; &quot;$fulldomain&quot; || return\" \/>\n\t\t<script type=\"application\/ld+json\" class=\"aioseo-schema\">\n\t\t\t{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"BlogPosting\",\"@id\":\"https:\\\/\\\/www.cmsws.com\\\/blog\\\/create-tinydns-hook-script-for-use-with-acme-sh\\\/#blogposting\",\"name\":\"Create TinyDNS \\u201chook\\u201d script for use with acme.sh \\u203a A different perspective\",\"headline\":\"Create TinyDNS &#8220;hook&#8221; script for use with acme.sh\",\"author\":{\"@id\":\"https:\\\/\\\/www.cmsws.com\\\/blog\\\/author\\\/jlucas\\\/#author\"},\"publisher\":{\"@id\":\"https:\\\/\\\/www.cmsws.com\\\/blog\\\/#organization\"},\"datePublished\":\"2025-07-16T10:53:20-07:00\",\"dateModified\":\"2025-07-16T10:53:20-07:00\",\"inLanguage\":\"en-US\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.cmsws.com\\\/blog\\\/create-tinydns-hook-script-for-use-with-acme-sh\\\/#webpage\"},\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.cmsws.com\\\/blog\\\/create-tinydns-hook-script-for-use-with-acme-sh\\\/#webpage\"},\"articleSection\":\"Misc\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.cmsws.com\\\/blog\\\/create-tinydns-hook-script-for-use-with-acme-sh\\\/#breadcrumblist\",\"itemListElement\":[{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.cmsws.com\\\/blog#listItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.cmsws.com\\\/blog\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.cmsws.com\\\/blog\\\/category\\\/misc\\\/#listItem\",\"name\":\"Misc\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.cmsws.com\\\/blog\\\/category\\\/misc\\\/#listItem\",\"position\":2,\"name\":\"Misc\",\"item\":\"https:\\\/\\\/www.cmsws.com\\\/blog\\\/category\\\/misc\\\/\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.cmsws.com\\\/blog\\\/create-tinydns-hook-script-for-use-with-acme-sh\\\/#listItem\",\"name\":\"Create TinyDNS &#8220;hook&#8221; script for use with acme.sh\"},\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.cmsws.com\\\/blog#listItem\",\"name\":\"Home\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.cmsws.com\\\/blog\\\/create-tinydns-hook-script-for-use-with-acme-sh\\\/#listItem\",\"position\":3,\"name\":\"Create TinyDNS &#8220;hook&#8221; script for use with acme.sh\",\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.cmsws.com\\\/blog\\\/category\\\/misc\\\/#listItem\",\"name\":\"Misc\"}}]},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.cmsws.com\\\/blog\\\/#organization\",\"name\":\"A different perspective\",\"description\":\"Right, lets get on with it...\",\"url\":\"https:\\\/\\\/www.cmsws.com\\\/blog\\\/\",\"telephone\":\"+15414085189\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.cmsws.com\\\/blog\\\/author\\\/jlucas\\\/#author\",\"url\":\"https:\\\/\\\/www.cmsws.com\\\/blog\\\/author\\\/jlucas\\\/\",\"name\":\"Jim Lucas\",\"image\":{\"@type\":\"ImageObject\",\"@id\":\"https:\\\/\\\/www.cmsws.com\\\/blog\\\/create-tinydns-hook-script-for-use-with-acme-sh\\\/#authorImage\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/3cbbbf6cb05c36455e4560d55d14ec27e194a9639eef5b88d16f0d547e8c55c7?s=96&d=mm&r=g\",\"width\":96,\"height\":96,\"caption\":\"Jim Lucas\"}},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.cmsws.com\\\/blog\\\/create-tinydns-hook-script-for-use-with-acme-sh\\\/#webpage\",\"url\":\"https:\\\/\\\/www.cmsws.com\\\/blog\\\/create-tinydns-hook-script-for-use-with-acme-sh\\\/\",\"name\":\"Create TinyDNS \\u201chook\\u201d script for use with acme.sh \\u203a A different perspective\",\"description\":\"Add \\\"hook\\\" processing file for acme.sh Create the file ~\\\/.acme.sh\\\/dns_tinydns.sh Add the following to this file: #!\\\/bin\\\/bash # acme.sh custom DNS API hook for TinyDNS # Path to your update script TINYSCRIPT=\\\"\\\/usr\\\/local\\\/bin\\\/update_tinydns_txt.sh\\\" dns_tinydns_add() { fulldomain=\\\"$1\\\" # e.g. _acme-challenge.example.com txtvalue=\\\"$2\\\" # e.g. the ACME challenge token _debug \\\"dns_tinydns_add: $fulldomain = $txtvalue\\\" \\\"$TINYSCRIPT\\\" \\\"$txtvalue\\\" \\\"$fulldomain\\\" || return\",\"inLanguage\":\"en-US\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.cmsws.com\\\/blog\\\/#website\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.cmsws.com\\\/blog\\\/create-tinydns-hook-script-for-use-with-acme-sh\\\/#breadcrumblist\"},\"author\":{\"@id\":\"https:\\\/\\\/www.cmsws.com\\\/blog\\\/author\\\/jlucas\\\/#author\"},\"creator\":{\"@id\":\"https:\\\/\\\/www.cmsws.com\\\/blog\\\/author\\\/jlucas\\\/#author\"},\"datePublished\":\"2025-07-16T10:53:20-07:00\",\"dateModified\":\"2025-07-16T10:53:20-07:00\"},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.cmsws.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/www.cmsws.com\\\/blog\\\/\",\"name\":\"A different perspective\",\"description\":\"Right, lets get on with it...\",\"inLanguage\":\"en-US\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.cmsws.com\\\/blog\\\/#organization\"}}]}\n\t\t<\/script>\n\t\t<!-- All in One SEO -->\n\n","aioseo_head_json":{"title":"Create TinyDNS \u201chook\u201d script for use with acme.sh \u203a A different perspective","description":"Add \"hook\" processing file for acme.sh Create the file ~\/.acme.sh\/dns_tinydns.sh Add the following to this file: #!\/bin\/bash # acme.sh custom DNS API hook for TinyDNS # Path to your update script TINYSCRIPT=\"\/usr\/local\/bin\/update_tinydns_txt.sh\" dns_tinydns_add() { fulldomain=\"$1\" # e.g. _acme-challenge.example.com txtvalue=\"$2\" # e.g. the ACME challenge token _debug \"dns_tinydns_add: $fulldomain = $txtvalue\" \"$TINYSCRIPT\" \"$txtvalue\" \"$fulldomain\" || return","canonical_url":"https:\/\/www.cmsws.com\/blog\/create-tinydns-hook-script-for-use-with-acme-sh\/","robots":"max-image-preview:large","keywords":"","webmasterTools":{"miscellaneous":""},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"BlogPosting","@id":"https:\/\/www.cmsws.com\/blog\/create-tinydns-hook-script-for-use-with-acme-sh\/#blogposting","name":"Create TinyDNS \u201chook\u201d script for use with acme.sh \u203a A different perspective","headline":"Create TinyDNS &#8220;hook&#8221; script for use with acme.sh","author":{"@id":"https:\/\/www.cmsws.com\/blog\/author\/jlucas\/#author"},"publisher":{"@id":"https:\/\/www.cmsws.com\/blog\/#organization"},"datePublished":"2025-07-16T10:53:20-07:00","dateModified":"2025-07-16T10:53:20-07:00","inLanguage":"en-US","mainEntityOfPage":{"@id":"https:\/\/www.cmsws.com\/blog\/create-tinydns-hook-script-for-use-with-acme-sh\/#webpage"},"isPartOf":{"@id":"https:\/\/www.cmsws.com\/blog\/create-tinydns-hook-script-for-use-with-acme-sh\/#webpage"},"articleSection":"Misc"},{"@type":"BreadcrumbList","@id":"https:\/\/www.cmsws.com\/blog\/create-tinydns-hook-script-for-use-with-acme-sh\/#breadcrumblist","itemListElement":[{"@type":"ListItem","@id":"https:\/\/www.cmsws.com\/blog#listItem","position":1,"name":"Home","item":"https:\/\/www.cmsws.com\/blog","nextItem":{"@type":"ListItem","@id":"https:\/\/www.cmsws.com\/blog\/category\/misc\/#listItem","name":"Misc"}},{"@type":"ListItem","@id":"https:\/\/www.cmsws.com\/blog\/category\/misc\/#listItem","position":2,"name":"Misc","item":"https:\/\/www.cmsws.com\/blog\/category\/misc\/","nextItem":{"@type":"ListItem","@id":"https:\/\/www.cmsws.com\/blog\/create-tinydns-hook-script-for-use-with-acme-sh\/#listItem","name":"Create TinyDNS &#8220;hook&#8221; script for use with acme.sh"},"previousItem":{"@type":"ListItem","@id":"https:\/\/www.cmsws.com\/blog#listItem","name":"Home"}},{"@type":"ListItem","@id":"https:\/\/www.cmsws.com\/blog\/create-tinydns-hook-script-for-use-with-acme-sh\/#listItem","position":3,"name":"Create TinyDNS &#8220;hook&#8221; script for use with acme.sh","previousItem":{"@type":"ListItem","@id":"https:\/\/www.cmsws.com\/blog\/category\/misc\/#listItem","name":"Misc"}}]},{"@type":"Organization","@id":"https:\/\/www.cmsws.com\/blog\/#organization","name":"A different perspective","description":"Right, lets get on with it...","url":"https:\/\/www.cmsws.com\/blog\/","telephone":"+15414085189"},{"@type":"Person","@id":"https:\/\/www.cmsws.com\/blog\/author\/jlucas\/#author","url":"https:\/\/www.cmsws.com\/blog\/author\/jlucas\/","name":"Jim Lucas","image":{"@type":"ImageObject","@id":"https:\/\/www.cmsws.com\/blog\/create-tinydns-hook-script-for-use-with-acme-sh\/#authorImage","url":"https:\/\/secure.gravatar.com\/avatar\/3cbbbf6cb05c36455e4560d55d14ec27e194a9639eef5b88d16f0d547e8c55c7?s=96&d=mm&r=g","width":96,"height":96,"caption":"Jim Lucas"}},{"@type":"WebPage","@id":"https:\/\/www.cmsws.com\/blog\/create-tinydns-hook-script-for-use-with-acme-sh\/#webpage","url":"https:\/\/www.cmsws.com\/blog\/create-tinydns-hook-script-for-use-with-acme-sh\/","name":"Create TinyDNS \u201chook\u201d script for use with acme.sh \u203a A different perspective","description":"Add \"hook\" processing file for acme.sh Create the file ~\/.acme.sh\/dns_tinydns.sh Add the following to this file: #!\/bin\/bash # acme.sh custom DNS API hook for TinyDNS # Path to your update script TINYSCRIPT=\"\/usr\/local\/bin\/update_tinydns_txt.sh\" dns_tinydns_add() { fulldomain=\"$1\" # e.g. _acme-challenge.example.com txtvalue=\"$2\" # e.g. the ACME challenge token _debug \"dns_tinydns_add: $fulldomain = $txtvalue\" \"$TINYSCRIPT\" \"$txtvalue\" \"$fulldomain\" || return","inLanguage":"en-US","isPartOf":{"@id":"https:\/\/www.cmsws.com\/blog\/#website"},"breadcrumb":{"@id":"https:\/\/www.cmsws.com\/blog\/create-tinydns-hook-script-for-use-with-acme-sh\/#breadcrumblist"},"author":{"@id":"https:\/\/www.cmsws.com\/blog\/author\/jlucas\/#author"},"creator":{"@id":"https:\/\/www.cmsws.com\/blog\/author\/jlucas\/#author"},"datePublished":"2025-07-16T10:53:20-07:00","dateModified":"2025-07-16T10:53:20-07:00"},{"@type":"WebSite","@id":"https:\/\/www.cmsws.com\/blog\/#website","url":"https:\/\/www.cmsws.com\/blog\/","name":"A different perspective","description":"Right, lets get on with it...","inLanguage":"en-US","publisher":{"@id":"https:\/\/www.cmsws.com\/blog\/#organization"}}]},"og:locale":"en_US","og:site_name":"A different perspective \u203a Right, lets get on with it...","og:type":"article","og:title":"Create TinyDNS \u201chook\u201d script for use with acme.sh \u203a A different perspective","og:description":"Add &quot;hook&quot; processing file for acme.sh Create the file ~\/.acme.sh\/dns_tinydns.sh Add the following to this file: #!\/bin\/bash # acme.sh custom DNS API hook for TinyDNS # Path to your update script TINYSCRIPT=&quot;\/usr\/local\/bin\/update_tinydns_txt.sh&quot; dns_tinydns_add() { fulldomain=&quot;$1&quot; # e.g. _acme-challenge.example.com txtvalue=&quot;$2&quot; # e.g. the ACME challenge token _debug &quot;dns_tinydns_add: $fulldomain = $txtvalue&quot; &quot;$TINYSCRIPT&quot; &quot;$txtvalue&quot; &quot;$fulldomain&quot; || return","og:url":"https:\/\/www.cmsws.com\/blog\/create-tinydns-hook-script-for-use-with-acme-sh\/","article:published_time":"2025-07-16T17:53:20+00:00","article:modified_time":"2025-07-16T17:53:20+00:00","twitter:card":"summary_large_image","twitter:title":"Create TinyDNS \u201chook\u201d script for use with acme.sh \u203a A different perspective","twitter:description":"Add &quot;hook&quot; processing file for acme.sh Create the file ~\/.acme.sh\/dns_tinydns.sh Add the following to this file: #!\/bin\/bash # acme.sh custom DNS API hook for TinyDNS # Path to your update script TINYSCRIPT=&quot;\/usr\/local\/bin\/update_tinydns_txt.sh&quot; dns_tinydns_add() { fulldomain=&quot;$1&quot; # e.g. _acme-challenge.example.com txtvalue=&quot;$2&quot; # e.g. the ACME challenge token _debug &quot;dns_tinydns_add: $fulldomain = $txtvalue&quot; &quot;$TINYSCRIPT&quot; &quot;$txtvalue&quot; &quot;$fulldomain&quot; || return"},"aioseo_meta_data":{"post_id":"315","title":null,"description":null,"keywords":null,"keyphrases":null,"primary_term":null,"canonical_url":null,"og_title":null,"og_description":null,"og_object_type":"default","og_image_type":"default","og_image_url":null,"og_image_width":null,"og_image_height":null,"og_image_custom_url":null,"og_image_custom_fields":null,"og_video":null,"og_custom_url":null,"og_article_section":null,"og_article_tags":null,"twitter_use_og":false,"twitter_card":"default","twitter_image_type":"default","twitter_image_url":null,"twitter_image_custom_url":null,"twitter_image_custom_fields":null,"twitter_title":null,"twitter_description":null,"schema":{"blockGraphs":[],"customGraphs":[],"default":{"data":{"Article":[],"Course":[],"Dataset":[],"FAQPage":[],"Movie":[],"Person":[],"Product":[],"ProductReview":[],"Car":[],"Recipe":[],"Service":[],"SoftwareApplication":[],"WebPage":[]},"graphName":"","isEnabled":true},"graphs":[]},"schema_type":"default","schema_type_options":null,"pillar_content":false,"robots_default":true,"robots_noindex":false,"robots_noarchive":false,"robots_nosnippet":false,"robots_nofollow":false,"robots_noimageindex":false,"robots_noodp":false,"robots_notranslate":false,"robots_max_snippet":null,"robots_max_videopreview":null,"robots_max_imagepreview":"large","priority":null,"frequency":null,"local_seo":null,"breadcrumb_settings":null,"limit_modified_date":false,"ai":null,"created":"2025-07-23 02:33:38","updated":"2025-07-23 02:33:38","seo_analyzer_scan_date":null},"aioseo_breadcrumb":"<div class=\"aioseo-breadcrumbs\"><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/www.cmsws.com\/blog\" title=\"Home\">Home<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">&raquo;<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/www.cmsws.com\/blog\/category\/misc\/\" title=\"Misc\">Misc<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">&raquo;<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\tCreate TinyDNS \u201chook\u201d script for use with acme.sh\n\t\t<\/span><\/div>","aioseo_breadcrumb_json":[{"label":"Home","link":"https:\/\/www.cmsws.com\/blog"},{"label":"Misc","link":"https:\/\/www.cmsws.com\/blog\/category\/misc\/"},{"label":"Create TinyDNS &#8220;hook&#8221; script for use with acme.sh","link":"https:\/\/www.cmsws.com\/blog\/create-tinydns-hook-script-for-use-with-acme-sh\/"}],"_links":{"self":[{"href":"https:\/\/www.cmsws.com\/blog\/wp-json\/wp\/v2\/posts\/315","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.cmsws.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.cmsws.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.cmsws.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.cmsws.com\/blog\/wp-json\/wp\/v2\/comments?post=315"}],"version-history":[{"count":0,"href":"https:\/\/www.cmsws.com\/blog\/wp-json\/wp\/v2\/posts\/315\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.cmsws.com\/blog\/wp-json\/wp\/v2\/media?parent=315"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.cmsws.com\/blog\/wp-json\/wp\/v2\/categories?post=315"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.cmsws.com\/blog\/wp-json\/wp\/v2\/tags?post=315"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}