This commit is contained in:
Slaviša Arežina
2025-12-24 14:21:58 +01:00
committed by GitHub
parent 36391bfc1e
commit c0f4ac5750
2 changed files with 21 additions and 24 deletions

View File

@@ -37,7 +37,7 @@ function update_script() {
if [ "$UPD" == "1" ]; then if [ "$UPD" == "1" ]; then
msg_info "Updating ${APP} LXC" msg_info "Updating ${APP} LXC"
$STD apt update $STD apt update
$STD apt -y upgrade $STD apt upgrade -y
msg_ok "Updated successfully!" msg_ok "Updated successfully!"
msg_info "Updating All Containers\n" msg_info "Updating All Containers\n"
@@ -65,7 +65,7 @@ function update_script() {
exit exit
fi fi
if [ "$UPD" == "3" ]; then if [ "$UPD" == "3" ]; then
IP=$(hostname -I | awk '{print $1}') import_local_ip
msg_info "Installing FileBrowser" msg_info "Installing FileBrowser"
$STD curl -fsSL https://raw.githubusercontent.com/filebrowser/get/master/get.sh | bash $STD curl -fsSL https://raw.githubusercontent.com/filebrowser/get/master/get.sh | bash
$STD filebrowser config init -a '0.0.0.0' $STD filebrowser config init -a '0.0.0.0'
@@ -74,23 +74,25 @@ function update_script() {
msg_ok "Installed FileBrowser" msg_ok "Installed FileBrowser"
msg_info "Creating Service" msg_info "Creating Service"
service_path="/etc/systemd/system/filebrowser.service" cat <<EOF >/etc/systemd/system/filebrowser.service
echo "[Unit] [Unit]
Description=Filebrowser Description=Filebrowser
After=network-online.target After=network-online.target
[Service]
User=root
WorkingDirectory=/root/
ExecStart=/usr/local/bin/filebrowser -r /
[Install]
WantedBy=default.target" >$service_path
$STD systemctl enable --now filebrowser [Service]
User=root
WorkingDirectory=/root/
ExecStart=/usr/local/bin/filebrowser -r /
[Install]
WantedBy=default.target
EOF
systemctl enable -q --now filebrowser
msg_ok "Created Service" msg_ok "Created Service"
msg_ok "Completed Successfully!\n" msg_ok "Completed Successfully!\n"
echo -e "FileBrowser should be reachable by going to the following URL. echo -e "FileBrowser should be reachable by going to the following URL.
${BL}http://$IP:8080${CL} admin|helper-scripts.com\n" ${BL}http://$LOCAL_IP:8080${CL} admin|helper-scripts.com\n"
exit exit
fi fi
if [ "$UPD" == "4" ]; then if [ "$UPD" == "4" ]; then
@@ -99,7 +101,6 @@ function update_script() {
msg_ok "Removed ALL Unused Images" msg_ok "Removed ALL Unused Images"
exit exit
fi fi
} }
start start

View File

@@ -13,12 +13,8 @@ setting_up_container
network_check network_check
update_os update_os
get_latest_release() { PORTAINER_LATEST_VERSION=$(get_latest_github_release "portainer/portainer")
curl -fsSL https://api.github.com/repos/$1/releases/latest | grep '"tag_name":' | cut -d'"' -f4 PORTAINER_AGENT_LATEST_VERSION=$(get_latest_github_release "portainer/agent")
}
PORTAINER_LATEST_VERSION=$(get_latest_release "portainer/portainer")
PORTAINER_AGENT_LATEST_VERSION=$(get_latest_release "portainer/agent")
if $STD mount | grep 'on / type zfs' >null && echo "ZFS"; then if $STD mount | grep 'on / type zfs' >null && echo "ZFS"; then
msg_info "Enabling ZFS support." msg_info "Enabling ZFS support."
@@ -44,8 +40,8 @@ EOF
fi fi
msg_info "Installing Podman" msg_info "Installing Podman"
$STD apt -y install podman $STD apt install -y podman
$STD systemctl enable --now podman.socket systemctl enable -q --now podman.socket
echo -e 'unqualified-search-registries=["docker.io"]' >>/etc/containers/registries.conf echo -e 'unqualified-search-registries=["docker.io"]' >>/etc/containers/registries.conf
msg_ok "Installed Podman" msg_ok "Installed Podman"
@@ -97,7 +93,7 @@ $STD podman run -d \
podman generate systemd \ podman generate systemd \
--new --name homeassistant \ --new --name homeassistant \
>/etc/systemd/system/homeassistant.service >/etc/systemd/system/homeassistant.service
$STD systemctl enable --now homeassistant systemctl enable -q --now homeassistant
msg_ok "Installed Home Assistant" msg_ok "Installed Home Assistant"
motd_ssh motd_ssh