diff --git a/helperbot b/helperbot index f8a0393..0e5eafa 100755 --- a/helperbot +++ b/helperbot @@ -47,7 +47,7 @@ function check_applications { # attempt to detect the system based on hostname function detect_system { - local valid_systems=("phosphorus" "neptunium" "cerium" "synthnix") + local valid_systems=("phosphorus" "neptunium") local current_hostname=$(hostname) for system in "${valid_systems[@]}"; do @@ -192,6 +192,16 @@ function update_docker_container { fi } +# deno install - installs/updates deno if required on the system, only used for neptunium currently +function deno_install { + if [ "$synth_current_system" = "neptunium" ]; then # only used on neptunium + echo "${blue}Running Deno installer.${normal}" + wget https://deno.land/install.sh -O /tmp/deno.sh && chmod +x /tmp/deno.sh + DENO_INSTALL=/usr/local /tmp/deno.sh -y # we assume deno has some error checking and with our script config will automatically stop for any issues + echo "${green}Okay.${normal}" + fi +} + # ╭──────────────╮ # │ upgrade step │ # ╰──────────────╯ @@ -203,6 +213,7 @@ function system_upgrade { if [ "$synth_current_system" = "phosphorus" ]; then # phosphorus # apt/system related upgrade base_system_upgrade + deno_update # docker update_docker_container "/srv/docker" "aode" "compose.yaml" update_docker_container "/srv/docker" "sharkey" "compose.yaml" @@ -214,6 +225,7 @@ function system_upgrade { elif [ "$synth_current_system" = "neptunium" ]; then # neptunium # apt/system related upgrade base_system_upgrade + deno_install # docker update_docker_container "/srv/docker" "ask-js" "compose.yaml" update_docker_container "/srv/docker" "caddy" "compose.yaml" @@ -226,6 +238,13 @@ function system_upgrade { update_docker_container "/srv/docker" "vaultwarden" "compose.yaml" update_docker_container "/srv/docker" "zitadel" "compose.yaml" update_docker_container "/srv/docker/forgejo" "runner" "compose.yaml" + # sites/others + echo "${blue}Pulling main site...${normal}" + git pull /var/www/site # main site + # pds-dash + echo "${blue}Updating pds-dash...${normal}" + git pull /var/www/pds-dash + cd /var/www/pds-dash && deno install && deno task build # done echo "${green}System upgrade finished! beep!~${normal}" fi