11#! /usr/bin/env bash
22source <( curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/build.func)
33# Copyright (c) 2021-2025 community-scripts ORG
4- # Author: tremor021
4+ # Author: Slaviša Arežina ( tremor021)
55# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
66# Source: https://github.com/YuukanOO/seelf
77
@@ -20,49 +20,31 @@ color
2020catch_errors
2121
2222function update_script() {
23- header_info
24- check_container_storage
25- check_container_resources
23+ header_info
24+ check_container_storage
25+ check_container_resources
2626
27- if [[ ! -d /opt/seelf ]]; then
28- msg_error " No ${APP} Installation Found!"
29- exit
30- fi
31-
32- RELEASE=$( curl -fsSL https://api.github.com/repos/YuukanOO/seelf/releases/latest | grep " tag_name" | awk ' {print substr($2, 3, length($2)-4) }' )
33- if [[ " ${RELEASE} " != " $( cat /opt/${APP} _version.txt) " ]] || [[ ! -f /opt/${APP} _version.txt ]]; then
34- msg_info " Updating $APP "
35-
36- msg_info " Stopping $APP "
37- systemctl stop seelf
38- msg_ok " Stopped $APP "
39-
40- msg_info " Updating $APP to v${RELEASE} . Patience"
41- export PATH=$PATH :/usr/local/go/bin
42- source ~ /.bashrc
43- curl -fsSL " https://github.com/YuukanOO/seelf/archive/refs/tags/v${RELEASE} .tar.gz" -o $( basename " https://github.com/YuukanOO/seelf/archive/refs/tags/v${RELEASE} .tar.gz" )
44- tar -xzf v${RELEASE} .tar.gz
45- cp -r seelf-${RELEASE} / /opt/seelf
46- cd /opt/seelf
47- $STD make build
48- msg_ok " Updated $APP to v${RELEASE} "
49-
50- msg_info " Starting $APP "
51- systemctl start seelf
52- msg_ok " Started $APP "
53-
54- # Cleaning up
55- msg_info " Cleaning Up"
56- rm -f ~ /* .tar.gz
57- rm -rf ~ /seelf-${RELEASE}
58- msg_ok " Cleanup Completed"
59-
60- echo " ${RELEASE} " > /opt/${APP} _version.txt
61- msg_ok " Update Successful"
62- else
63- msg_ok " No update required. ${APP} is already at v${RELEASE} "
64- fi
27+ if [[ ! -d /opt/seelf ]]; then
28+ msg_error " No ${APP} Installation Found!"
6529 exit
30+ fi
31+ if fetch_and_deploy_gh_release " YuukanOO/seelf" ; then
32+ msg_ok " $APP already at the latest version. No update required."
33+ else
34+ msg_info " Stopping $APP "
35+ systemctl stop seelf
36+ msg_ok " Stopped $APP "
37+
38+ msg_info " Updating $APP "
39+ cd /opt/seelf
40+ $STD make build
41+ msg_ok " Updated $APP "
42+
43+ msg_info " Starting $APP "
44+ systemctl start seelf
45+ msg_ok " Started $APP "
46+ fi
47+ exit
6648}
6749
6850start
0 commit comments