{
    "api_version": "1",
    "kind": "dse_post",
    "self": "https://update.dsesecurity.com/api/v1/posts/set-a-truenas-shutdown-script-timeout-for-the-real-task/",
    "item": {
        "id": "https://update.dsesecurity.com/updates/set-a-truenas-shutdown-script-timeout-for-the-real-task/",
        "slug": "set-a-truenas-shutdown-script-timeout-for-the-real-task",
        "url": "https://update.dsesecurity.com/updates/set-a-truenas-shutdown-script-timeout-for-the-real-task/",
        "alternate_urls": {
            "markdown": "https://update.dsesecurity.com/updates/set-a-truenas-shutdown-script-timeout-for-the-real-task.md",
            "json": "https://update.dsesecurity.com/api/v1/posts/set-a-truenas-shutdown-script-timeout-for-the-real-task/"
        },
        "title": "Set a TrueNAS shutdown-script timeout for the real task",
        "summary": "Match lifecycle phase, sequential execution and timeout to the intended script before relying on a shutdown task.",
        "format": {
            "slug": "guide",
            "name": "Guide"
        },
        "priority": {
            "slug": "advisory",
            "name": "Advisory"
        },
        "featured": false,
        "image": {
            "theme": "network-infrastructure",
            "label": "Networks & infrastructure",
            "alt": "Resilient network core with engineered blue and gold data paths.",
            "card_url": "https://update.dsesecurity.com/assets/editorial/network-infrastructure-card.webp?v=1.8.20",
            "hero_url": "https://update.dsesecurity.com/assets/editorial/network-infrastructure-hero.webp?v=1.8.20",
            "social_url": "https://update.dsesecurity.com/assets/editorial/network-infrastructure-social-v2.jpg?v=1.8.20",
            "width": 2400,
            "height": 1350
        },
        "topics": [
            {
                "slug": "business-continuity",
                "name": "Business Continuity",
                "url": "https://update.dsesecurity.com/topic/business-continuity/"
            },
            {
                "slug": "networks-infrastructure",
                "name": "Networks & Infrastructure",
                "url": "https://update.dsesecurity.com/topic/networks-infrastructure/"
            }
        ],
        "author": {
            "name": "DSE Security Editorial Team",
            "url": "https://update.dsesecurity.com/#editorial-team",
            "type": "Organization"
        },
        "publisher": {
            "name": "Detection Systems & Engineering",
            "url": "https://dsesecurity.com/"
        },
        "published_at": "2026-10-29T17:41:06+00:00",
        "modified_at": "2026-10-29T17:41:38+00:00",
        "reviewed_on": "2026-10-29",
        "reading_minutes": 3,
        "word_count": 535,
        "potentially_affected": "TrueNAS 25.10 administrators configuring Init/Shutdown Script tasks.",
        "dse_recommendation": "Review the complete script chain and rehearse bounded normal and overrun cases on a disposable system.",
        "primary_source": {
            "name": "TrueNAS — Managing Init/Shutdown Scripts",
            "url": "https://www.truenas.com/docs/scale/25.10/scaletutorials/systemsettings/advanced/manageinitshutdownscale/",
            "published_on": null,
            "authority": "www.truenas.com"
        },
        "publishing_principles": "https://update.dsesecurity.com/updates/dse-updates-editorial-methodology/",
        "usage_info": "https://update.dsesecurity.com/usage/",
        "copyright_notice": "Copyright © 2026 Detection Systems & Engineering. All rights reserved.",
        "content_html": "<p><strong>Bottom line:</strong> Choose the lifecycle phase and a justified timeout before enabling a script task. Use a harmless rehearsal to check its timing and evidence, and keep the intended shutdown work separate from a claim that every dependency will remain available.</p>\n<h2>Source fact: what the authority says</h2>\n<p>The <a href=\"https://www.truenas.com/docs/scale/25.10/scaletutorials/systemsettings/advanced/manageinitshutdownscale/\" target=\"_blank\" rel=\"noopener noreferrer\">TrueNAS Init/Shutdown guide</a> places Pre Init after filesystems and networking are available, Post Init just before services start and Shutdown after services begin stopping. Scripts in one category run sequentially in the order they were added, and a hanging or slow script delays the next script in that category. The Timeout setting limits a script’s run time, and shutdown resources or services might no longer be available. A script must have its execute bit set and defaults to dash unless a shebang selects another interpreter.</p>\n<h2>What the source does not establish</h2>\n<p>The source defines task timing and execution controls, not a guarantee that an arbitrary script is safe during shutdown. This article does not establish the availability of a particular external system, interpreter dependency or application-consistent backup at that point.</p>\n<h2>Applicability questions</h2>\n<ul>\n<li>Which lifecycle category actually matches the intended task?</li>\n<li>What earlier scripts run in the same category?</li>\n<li>What resources does the complete invoked chain need, and when are they available?</li>\n<li>What normal duration, timeout and operator response are approved?</li>\n</ul>\n<h2>DSE recommendation: controlled next steps</h2>\n<p><em>The following steps are DSE recommendations based on the cited source.</em></p>\n<p>DSE recommends reviewing the entire invoked chain, including child scripts, network requests and interpreter selection. Give each required resource an owner and a proposed availability check. Do not choose Shutdown merely because the command worked in an interactive session on a fully running system.</p>\n<p>Prepare a proposed harmless task that records its start, end and a unique test identifier to an approved local destination. Place a second harmless marker task after it in the same category. Define what observations would distinguish successful completion, an overrun and an unavailable dependency.</p>\n<p>Choose a timeout from the task’s approved operating envelope rather than copying an example. Agree what work may remain incomplete if the limit is reached and who investigates it. Keep destructive cleanup or secret handling out of the initial rehearsal.</p>\n<p>Review the category order before enabling another task. Preserve the original task settings and a supported recovery route for a system that fails to boot or shut down as expected. Treat a changed script body or interpreter as a reason to repeat the bounded review.</p>\n<h2>Verification and evidence</h2>\n<p>Proposed verification: on a disposable or expressly approved representative system, run a normal-duration lifecycle exercise and then a separately approved overrun case. Observe both tasks, elapsed time and the resulting system state. Preserve actual records without asserting that the proposed cases have already passed.</p>\n<p>Repeat the dependency check at the selected lifecycle phase rather than substituting a later interactive run. Compare the recorded order with the approved sequence and investigate missing markers. Accept only the named task and conditions; leave broader backup or application recovery acceptance to its separate procedure.</p>\n<h2>Official references</h2>\n<ul>\n<li><a href=\"https://www.truenas.com/docs/scale/25.10/scaletutorials/systemsettings/advanced/manageinitshutdownscale/\" target=\"_blank\" rel=\"noopener noreferrer\">TrueNAS — Managing Init/Shutdown Scripts</a> — official product documentation; confirm the installed release and configuration.</li>\n</ul>\n<p>Source review completed October 29, 2026. Recheck the official documentation and deployment-specific applicability before a production change.</p>\n",
        "content_text": "Bottom line: Choose the lifecycle phase and a justified timeout before enabling a script task. Use a harmless rehearsal to check its timing and evidence, and keep the intended shutdown work separate from a claim that every dependency will remain available.\nSource fact: what the authority says\nThe TrueNAS Init/Shutdown guide places Pre Init after filesystems and networking are available, Post Init just before services start and Shutdown after services begin stopping. Scripts in one category run sequentially in the order they were added, and a hanging or slow script delays the next script in that category. The Timeout setting limits a script’s run time, and shutdown resources or services might no longer be available. A script must have its execute bit set and defaults to dash unless a shebang selects another interpreter.\nWhat the source does not establish\nThe source defines task timing and execution controls, not a guarantee that an arbitrary script is safe during shutdown. This article does not establish the availability of a particular external system, interpreter dependency or application-consistent backup at that point.\nApplicability questions\n\nWhich lifecycle category actually matches the intended task?\nWhat earlier scripts run in the same category?\nWhat resources does the complete invoked chain need, and when are they available?\nWhat normal duration, timeout and operator response are approved?\n\nDSE recommendation: controlled next steps\nThe following steps are DSE recommendations based on the cited source.\nDSE recommends reviewing the entire invoked chain, including child scripts, network requests and interpreter selection. Give each required resource an owner and a proposed availability check. Do not choose Shutdown merely because the command worked in an interactive session on a fully running system.\nPrepare a proposed harmless task that records its start, end and a unique test identifier to an approved local destination. Place a second harmless marker task after it in the same category. Define what observations would distinguish successful completion, an overrun and an unavailable dependency.\nChoose a timeout from the task’s approved operating envelope rather than copying an example. Agree what work may remain incomplete if the limit is reached and who investigates it. Keep destructive cleanup or secret handling out of the initial rehearsal.\nReview the category order before enabling another task. Preserve the original task settings and a supported recovery route for a system that fails to boot or shut down as expected. Treat a changed script body or interpreter as a reason to repeat the bounded review.\nVerification and evidence\nProposed verification: on a disposable or expressly approved representative system, run a normal-duration lifecycle exercise and then a separately approved overrun case. Observe both tasks, elapsed time and the resulting system state. Preserve actual records without asserting that the proposed cases have already passed.\nRepeat the dependency check at the selected lifecycle phase rather than substituting a later interactive run. Compare the recorded order with the approved sequence and investigate missing markers. Accept only the named task and conditions; leave broader backup or application recovery acceptance to its separate procedure.\nOfficial references\n\nTrueNAS — Managing Init/Shutdown Scripts — official product documentation; confirm the installed release and configuration.\n\nSource review completed October 29, 2026. Recheck the official documentation and deployment-specific applicability before a production change.",
        "content_markdown": "Bottom line: Choose the lifecycle phase and a justified timeout before enabling a script task. Use a harmless rehearsal to check its timing and evidence, and keep the intended shutdown work separate from a claim that every dependency will remain available.\n\n## Source fact: what the authority says\n\nThe [TrueNAS Init/Shutdown guide](https://www.truenas.com/docs/scale/25.10/scaletutorials/systemsettings/advanced/manageinitshutdownscale/) places Pre Init after filesystems and networking are available, Post Init just before services start and Shutdown after services begin stopping. Scripts in one category run sequentially in the order they were added, and a hanging or slow script delays the next script in that category. The Timeout setting limits a script’s run time, and shutdown resources or services might no longer be available. A script must have its execute bit set and defaults to dash unless a shebang selects another interpreter.\n\n## What the source does not establish\n\nThe source defines task timing and execution controls, not a guarantee that an arbitrary script is safe during shutdown. This article does not establish the availability of a particular external system, interpreter dependency or application-consistent backup at that point.\n\n## Applicability questions\n\n- Which lifecycle category actually matches the intended task?\n\n- What earlier scripts run in the same category?\n\n- What resources does the complete invoked chain need, and when are they available?\n\n- What normal duration, timeout and operator response are approved?\n\n## DSE recommendation: controlled next steps\n\nThe following steps are DSE recommendations based on the cited source.\n\nDSE recommends reviewing the entire invoked chain, including child scripts, network requests and interpreter selection. Give each required resource an owner and a proposed availability check. Do not choose Shutdown merely because the command worked in an interactive session on a fully running system.\n\nPrepare a proposed harmless task that records its start, end and a unique test identifier to an approved local destination. Place a second harmless marker task after it in the same category. Define what observations would distinguish successful completion, an overrun and an unavailable dependency.\n\nChoose a timeout from the task’s approved operating envelope rather than copying an example. Agree what work may remain incomplete if the limit is reached and who investigates it. Keep destructive cleanup or secret handling out of the initial rehearsal.\n\nReview the category order before enabling another task. Preserve the original task settings and a supported recovery route for a system that fails to boot or shut down as expected. Treat a changed script body or interpreter as a reason to repeat the bounded review.\n\n## Verification and evidence\n\nProposed verification: on a disposable or expressly approved representative system, run a normal-duration lifecycle exercise and then a separately approved overrun case. Observe both tasks, elapsed time and the resulting system state. Preserve actual records without asserting that the proposed cases have already passed.\n\nRepeat the dependency check at the selected lifecycle phase rather than substituting a later interactive run. Compare the recorded order with the approved sequence and investigate missing markers. Accept only the named task and conditions; leave broader backup or application recovery acceptance to its separate procedure.\n\n## Official references\n\n- [TrueNAS — Managing Init/Shutdown Scripts](https://www.truenas.com/docs/scale/25.10/scaletutorials/systemsettings/advanced/manageinitshutdownscale/) — official product documentation; confirm the installed release and configuration.\n\nSource review completed October 29, 2026. Recheck the official documentation and deployment-specific applicability before a production change."
    },
    "json_ld": {
        "@context": "https://schema.org",
        "@graph": [
            {
                "@type": "Organization",
                "@id": "https://dsesecurity.com/#organization",
                "name": "Detection Systems & Engineering",
                "alternateName": "DSE Security",
                "url": "https://dsesecurity.com/",
                "logo": {
                    "@type": "ImageObject",
                    "url": "https://update.dsesecurity.com/assets/dse-logo-20260812.png?v=1.8.20"
                }
            },
            {
                "@type": "Organization",
                "@id": "https://update.dsesecurity.com/#editorial-team",
                "name": "DSE Security Editorial Team",
                "url": "https://update.dsesecurity.com/",
                "parentOrganization": {
                    "@id": "https://dsesecurity.com/#organization"
                }
            },
            {
                "@type": "WebSite",
                "@id": "https://update.dsesecurity.com/#website",
                "name": "DSE Updates",
                "alternateName": "DSE Security Knowledge Hub",
                "url": "https://update.dsesecurity.com/",
                "inLanguage": "en-US",
                "publisher": {
                    "@id": "https://dsesecurity.com/#organization"
                },
                "potentialAction": {
                    "@type": "SearchAction",
                    "target": {
                        "@type": "EntryPoint",
                        "urlTemplate": "https://update.dsesecurity.com/?q={search_term_string}"
                    },
                    "query-input": "required name=search_term_string"
                }
            },
            {
                "@type": "WebPage",
                "@id": "https://update.dsesecurity.com/updates/set-a-truenas-shutdown-script-timeout-for-the-real-task/",
                "url": "https://update.dsesecurity.com/updates/set-a-truenas-shutdown-script-timeout-for-the-real-task/",
                "isPartOf": {
                    "@id": "https://update.dsesecurity.com/#website"
                },
                "lastReviewed": "2026-10-29"
            },
            {
                "@type": "BreadcrumbList",
                "@id": "https://update.dsesecurity.com/updates/set-a-truenas-shutdown-script-timeout-for-the-real-task/#breadcrumbs",
                "itemListElement": [
                    {
                        "@type": "ListItem",
                        "position": 1,
                        "name": "DSE Updates",
                        "item": "https://update.dsesecurity.com/"
                    },
                    {
                        "@type": "ListItem",
                        "position": 2,
                        "name": "Business Continuity",
                        "item": "https://update.dsesecurity.com/topic/business-continuity/"
                    },
                    {
                        "@type": "ListItem",
                        "position": 3,
                        "name": "Set a TrueNAS shutdown-script timeout for the real task",
                        "item": "https://update.dsesecurity.com/updates/set-a-truenas-shutdown-script-timeout-for-the-real-task/"
                    }
                ]
            },
            {
                "@type": [
                    "Article",
                    "TechArticle"
                ],
                "@id": "https://update.dsesecurity.com/updates/set-a-truenas-shutdown-script-timeout-for-the-real-task/#article",
                "identifier": "https://update.dsesecurity.com/updates/set-a-truenas-shutdown-script-timeout-for-the-real-task/",
                "url": "https://update.dsesecurity.com/updates/set-a-truenas-shutdown-script-timeout-for-the-real-task/",
                "headline": "Set a TrueNAS shutdown-script timeout for the real task",
                "description": "Match lifecycle phase, sequential execution and timeout to the intended script before relying on a shutdown task.",
                "abstract": "Match lifecycle phase, sequential execution and timeout to the intended script before relying on a shutdown task.",
                "articleBody": "Bottom line: Choose the lifecycle phase and a justified timeout before enabling a script task. Use a harmless rehearsal to check its timing and evidence, and keep the intended shutdown work separate from a claim that every dependency will remain available.\nSource fact: what the authority says\nThe TrueNAS Init/Shutdown guide places Pre Init after filesystems and networking are available, Post Init just before services start and Shutdown after services begin stopping. Scripts in one category run sequentially in the order they were added, and a hanging or slow script delays the next script in that category. The Timeout setting limits a script’s run time, and shutdown resources or services might no longer be available. A script must have its execute bit set and defaults to dash unless a shebang selects another interpreter.\nWhat the source does not establish\nThe source defines task timing and execution controls, not a guarantee that an arbitrary script is safe during shutdown. This article does not establish the availability of a particular external system, interpreter dependency or application-consistent backup at that point.\nApplicability questions\n\nWhich lifecycle category actually matches the intended task?\nWhat earlier scripts run in the same category?\nWhat resources does the complete invoked chain need, and when are they available?\nWhat normal duration, timeout and operator response are approved?\n\nDSE recommendation: controlled next steps\nThe following steps are DSE recommendations based on the cited source.\nDSE recommends reviewing the entire invoked chain, including child scripts, network requests and interpreter selection. Give each required resource an owner and a proposed availability check. Do not choose Shutdown merely because the command worked in an interactive session on a fully running system.\nPrepare a proposed harmless task that records its start, end and a unique test identifier to an approved local destination. Place a second harmless marker task after it in the same category. Define what observations would distinguish successful completion, an overrun and an unavailable dependency.\nChoose a timeout from the task’s approved operating envelope rather than copying an example. Agree what work may remain incomplete if the limit is reached and who investigates it. Keep destructive cleanup or secret handling out of the initial rehearsal.\nReview the category order before enabling another task. Preserve the original task settings and a supported recovery route for a system that fails to boot or shut down as expected. Treat a changed script body or interpreter as a reason to repeat the bounded review.\nVerification and evidence\nProposed verification: on a disposable or expressly approved representative system, run a normal-duration lifecycle exercise and then a separately approved overrun case. Observe both tasks, elapsed time and the resulting system state. Preserve actual records without asserting that the proposed cases have already passed.\nRepeat the dependency check at the selected lifecycle phase rather than substituting a later interactive run. Compare the recorded order with the approved sequence and investigate missing markers. Accept only the named task and conditions; leave broader backup or application recovery acceptance to its separate procedure.\nOfficial references\n\nTrueNAS — Managing Init/Shutdown Scripts — official product documentation; confirm the installed release and configuration.\n\nSource review completed October 29, 2026. Recheck the official documentation and deployment-specific applicability before a production change.",
                "datePublished": "2026-10-29T17:41:06+00:00",
                "dateModified": "2026-10-29T17:41:38+00:00",
                "mainEntityOfPage": {
                    "@id": "https://update.dsesecurity.com/updates/set-a-truenas-shutdown-script-timeout-for-the-real-task/"
                },
                "inLanguage": "en-US",
                "isAccessibleForFree": true,
                "author": {
                    "@type": "Organization",
                    "name": "DSE Security Editorial Team",
                    "url": "https://update.dsesecurity.com/#editorial-team"
                },
                "publisher": {
                    "@id": "https://dsesecurity.com/#organization"
                },
                "image": {
                    "@type": "ImageObject",
                    "@id": "https://update.dsesecurity.com/updates/set-a-truenas-shutdown-script-timeout-for-the-real-task/#primaryimage",
                    "url": "https://update.dsesecurity.com/assets/editorial/network-infrastructure-social-v2.jpg?v=1.8.20",
                    "contentUrl": "https://update.dsesecurity.com/assets/editorial/network-infrastructure-social-v2.jpg?v=1.8.20",
                    "width": 1200,
                    "height": 630,
                    "caption": "Set a TrueNAS shutdown-script timeout for the real task"
                },
                "articleSection": [
                    "Business Continuity",
                    "Networks & Infrastructure"
                ],
                "keywords": [
                    "Business Continuity",
                    "Networks & Infrastructure",
                    "Guide",
                    "Advisory priority"
                ],
                "genre": "Guide",
                "about": [
                    {
                        "@type": "Thing",
                        "name": "Business Continuity",
                        "url": "https://update.dsesecurity.com/topic/business-continuity/"
                    },
                    {
                        "@type": "Thing",
                        "name": "Networks & Infrastructure",
                        "url": "https://update.dsesecurity.com/topic/networks-infrastructure/"
                    }
                ],
                "wordCount": 535,
                "timeRequired": "PT3M",
                "publishingPrinciples": "https://update.dsesecurity.com/updates/dse-updates-editorial-methodology/",
                "usageInfo": "https://update.dsesecurity.com/usage/",
                "copyrightHolder": {
                    "@id": "https://dsesecurity.com/#organization"
                },
                "copyrightNotice": "Copyright © 2026 Detection Systems & Engineering. All rights reserved.",
                "citation": {
                    "@type": "CreativeWork",
                    "name": "TrueNAS — Managing Init/Shutdown Scripts",
                    "url": "https://www.truenas.com/docs/scale/25.10/scaletutorials/systemsettings/advanced/manageinitshutdownscale/"
                }
            }
        ]
    }
}