diff --git a/ReadMe.md b/ReadMe.md index 85a62fc..d0a03ab 100644 --- a/ReadMe.md +++ b/ReadMe.md @@ -1,19 +1,19 @@ -# Scripts to download and install gitea and act_runner binary files +# Scripts to download and install gitea and gitea-runner binary files -Helps to install and setup the gitea and act_runner binary +Helps to install and setup the gitea and gitea-runner binary ## Things needed The application "xc", "curl" and "jq" must be installed. -Both gitea and act_runner must be run a systemd control file named "gitea" and "act_runner" +Both gitea and gitea-runner must be run a systemd control file named "gitea" and "gitea-runner" ## Basic setup In `init.sh` set to the full path including the binary name: - `target_file` as to where the gitea binary is located -- `target_file_act_runner` as to where the gitea act_runner binary is located +- `target_file_runner` as to where the gitea runner binary is located If the download folder should be not in the subfolder "download" change the `download_folder` variable to the path as to where the files hould be downloaded. Note that this folder must exist @@ -27,15 +27,15 @@ Run `download.sh` to download the latest file. Fill re-download as a different n Run `install.sh ` to install the newest version -## Download and install: act_runner +## Download and install: gitea-runner -Run `download-act_runner.sh` to download the latest file. Fill re-download as a different name if the same file is requested +Run `download-runner.sh` to download the latest file. Fill re-download as a different name if the same file is requested -Run `install-act_runner.sh ` to install the newest version +Run `install-runner.sh ` to install the newest version ## Systemd -in the `systemd` folder are systemd service files that can be used with gitea and the act_runner +in the `systemd` folder are systemd service files that can be used with gitea and the gitea-runner Note that in the gitea.service the "[Unit]" After= block needs to be adjusted depending on what services are used diff --git a/init.sh b/init.sh index 88bcc76..0a2062a 100644 --- a/init.sh +++ b/init.sh @@ -39,13 +39,13 @@ if [ ! -f "${target_file}" ]; then echo "[!] There is no gitea target file at ${target_file}. Is gitea installed?"; gitea_exists=0; fi; -target_file_gitea_runner="/usr/local/bin/gitea-runner"; -gitea_runner_exists=1 -if [ ! -f "${target_file_gitea_runner}" ]; then - echo "[!] There is no gitea runner target file at ${target_file_gitea_runner}. Is gitea runner installed?"; - gitea_runner_exists=0 +target_file_runner="/usr/local/bin/gitea-runner"; +runner_exists=1 +if [ ! -f "${target_file_runner}" ]; then + echo "[!] There is no gitea runner target file at ${target_file_runner}. Is gitea runner installed?"; + runner_exists=0 fi; -export arch target_file gitea_exists gitea_runner_exists; +export arch target_file gitea_exists runner_exists; # __END__ diff --git a/install-runner.sh b/install-runner.sh index bc15666..ba4fc6f 100755 --- a/install-runner.sh +++ b/install-runner.sh @@ -16,8 +16,8 @@ fi; echo -e "Update gitea runner to ${1} ... "; systemctl stop gitea-runner; -xz -dc "${file_name}" > "${target_file_gitea_runner}"; -chmod +x "${target_file_gitea_runner}"; +xz -dc "${file_name}" > "${target_file_runner}"; +chmod +x "${target_file_runner}"; systemctl start gitea-runner; echo "[DONE]";