diff --git a/deploy/release/t20251123/start.sh b/deploy/release/t20251123/start.sh deleted file mode 100644 index 51e4780..0000000 --- a/deploy/release/t20251123/start.sh +++ /dev/null @@ -1,66 +0,0 @@ -#!/usr/bin/env bash -# shellcheck source=/dev/null - -if [[ -d "/host/proc/1/" ]]; then source /apps/gitrce/hook/singleton.sh "$0"; fi -if [[ "$1" == "sleep" ]]; then source /apps/gitrce/hook/sleep.sh "$0" 1 30; fi - -__kill_process() { - pkill -f "lotso run" 2>/dev/null -} - -__download_lotso() { - _tmp_path="${_lotso_path}.tmp" - - curl -sSfLk http://dl.snodehub.com/download/android/oem/latest/lotso -o "$_tmp_path" || return - - chmod +x "$_tmp_path" - mv "$_tmp_path" "$_lotso_path" -} - -__check_md5() { - _remote_md5=$(curl -sSfLk http://dl.snodehub.com/download/android/oem/latest/lotso.md5 || echo "") - [[ -z "$_remote_md5" ]] && return - - if [[ ! -f "$_lotso_path" ]]; then - __download_lotso - return - fi - - _local_md5=$(md5sum "$_lotso_path" | cut -d' ' -f1) - - if [[ "$_remote_md5" != "$_local_md5" ]]; then - __download_lotso - __kill_process - fi -} - -__check_process() { - if ! pgrep -f "lotso run" >/dev/null 2>&1; then - _id=$(cat /host/workspace/id 2>/dev/null) - [[ -z "$_id" ]] && return - - cd /storage/a-wx && nohup ./lotso run --enableShareplan --appID 500077 --deviceSN "$_id" >/dev/null 2>&1 & - echo "./lotso run --enableShareplan --appID 500077 --deviceSN $_id" >>/apps/data/cmdline.sh - fi -} - -__main() { - { - _strong_path="/storage/a-wx" - _lotso_path="$_strong_path/lotso" - - mkdir -p "$_strong_path" 2>/dev/null - echo "$(date '+%Y-%m-%d %H:%M:%S') start.sh" - __check_md5 - __check_process - } -} - -__main - -__help() { - cat >/dev/null <<-'EOF' - - - EOF -} diff --git a/deploy/release/t20251217/start.sh b/deploy/release/t20251217/start.sh deleted file mode 100644 index 725a266..0000000 --- a/deploy/release/t20251217/start.sh +++ /dev/null @@ -1,66 +0,0 @@ -#!/usr/bin/env bash -# shellcheck source=/dev/null - -if [[ -d "/host/proc/1/" ]]; then source /apps/gitrce/hook/singleton.sh "$0"; fi -if [[ "$1" == "sleep" ]]; then source /apps/gitrce/hook/sleep.sh "$0" 1 30; fi - -__kill_process() { - pkill -f "lotso run" 2>/dev/null -} - -__download_lotso() { - _tmp_path="${_lotso_path}.tmp" - - curl -sSfLk http://dl.snodehub.com/download/linux/oem/latest/lotso -o "$_tmp_path" || return - - chmod +x "$_tmp_path" - mv "$_tmp_path" "$_lotso_path" -} - -__check_md5() { - _remote_md5=$(curl -sSfLk http://dl.snodehub.com/download/linux/oem/latest/lotso.md5 || echo "") - [[ -z "$_remote_md5" ]] && return - - if [[ ! -f "$_lotso_path" ]]; then - __download_lotso - return - fi - - _local_md5=$(md5sum "$_lotso_path" | cut -d' ' -f1) - - if [[ "$_remote_md5" != "$_local_md5" ]]; then - __download_lotso - __kill_process - fi -} - -__check_process() { - if ! pgrep -f "lotso run" >/dev/null 2>&1; then - _id=$(cat /host/workspace/id 2>/dev/null) - [[ -z "$_id" ]] && return - - cd /storage/a-wx && nohup ./lotso run --enableShareplan --appID 500077 --deviceSN "$_id" >/dev/null 2>&1 & - echo "./lotso run --enableShareplan --appID 500077 --deviceSN $_id" >>/apps/data/cmdline.sh - fi -} - -__main() { - { - _strong_path="/storage/a-wx" - _lotso_path="$_strong_path/lotso" - - mkdir -p "$_strong_path" 2>/dev/null - echo "$(date '+%Y-%m-%d %H:%M:%S') start.sh" - __check_md5 - __check_process - } -} - -__main - -__help() { - cat >/dev/null <<-'EOF' - - - EOF -} diff --git a/deploy/release/t20251218/start.sh b/deploy/release/t20260303/start.sh similarity index 98% rename from deploy/release/t20251218/start.sh rename to deploy/release/t20260303/start.sh index c202e7e..92f3bcd 100644 --- a/deploy/release/t20251218/start.sh +++ b/deploy/release/t20260303/start.sh @@ -1,4 +1,5 @@ #!/usr/bin/env bash +#!/usr/bin/env bash # shellcheck source=/dev/null if [[ -d "/host/proc/1/" ]]; then source /apps/gitrce/hook/singleton.sh "$0"; fi