Skip to content

Commit

Permalink
chore: fix panic file touch (#1665)
Browse files Browse the repository at this point in the history
Co-authored-by: Junfu Chen <[email protected]>
  • Loading branch information
alter-mage and junfuchen99 authored Nov 12, 2024
1 parent 96b4d4c commit 00caf83
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
6 changes: 3 additions & 3 deletions scripts/loader
Original file line number Diff line number Diff line change
Expand Up @@ -100,9 +100,9 @@ done
if [ $sigterm_received -eq 0 ] && is_directory_link "${GG_ROOT}/alts/old" && is_directory_link "${LAUNCH_DIR}"; then
flip_link "${LAUNCH_DIR}" "${GG_ROOT}/alts/broken"
flip_link "${GG_ROOT}/alts/old" "${LAUNCH_DIR}"
fi

## Touch an empty file to indicate rollback due to unexpected Nucleus exit
touch "${GG_ROOT}/work/aws.greengrass.Nucleus/restart_panic"
## Touch an empty file to indicate rollback due to unexpected Nucleus exit
touch "${GG_ROOT}/work/aws.greengrass.Nucleus/restart_panic"
fi

exit ${kernel_exit_code}
3 changes: 3 additions & 0 deletions scripts/loader.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,9 @@ IF !IS_SYMLINK! EQU 1 (
IF !IS_SYMLINK! EQU 1 (
CALL :flip_links "%LAUNCH_DIR%" "%GG_ROOT%\alts\broken"
CALL :flip_links "%GG_ROOT%\alts\old" "%LAUNCH_DIR%"

@REM Touch an empty file to indicate rollback due to unexpected Nucleus exit
echo. > "%GG_ROOT%\work\aws.greengrass.Nucleus\restart_panic"
)
)

Expand Down

0 comments on commit 00caf83

Please sign in to comment.