Add gitea donwload file version info, missing installs are no longer forced exit

fix restart of act runner after update

when downloading gitea or act runner it will show the version that is downlaoded.
if the same version is downloaded again and alrady exists, download will be skipped
This commit is contained in:
Clemens Schwaighofer
2025-02-27 12:38:18 +09:00
parent 11c1daf4a1
commit 324b577134
4 changed files with 33 additions and 9 deletions

12
init.sh
View File

@@ -30,16 +30,18 @@ if [ ! -d "${download_folder}" ]; then
exit;
fi;
target_file="/usr/local/bin/gitea";
gitea_exists=1;
if [ ! -f "${target_file}" ]; then
echo "There is no gitea target file at ${target_file}. Is gitea installed?";
exit;
echo "[!] There is no gitea target file at ${target_file}. Is gitea installed?";
gitea_exists=0;
fi;
target_file_act_runner="/usr/local/bin/act_runner";
act_runner_exists=1
if [ ! -f "${target_file_act_runner}" ]; then
echo "There is no gitea action runner target file at ${target_file}. Is gitea action runner installed?";
exit;
echo "[!] There is no gitea action runner target file at ${target_file}. Is gitea action runner installed?";
act_runner_exists=0
fi;
export arch target_file;
export arch target_file gitea_exists act_runner_exists;
# __END__