add fladder
This commit is contained in:
parent
3417282c37
commit
cf80bb6e5f
86
ct/fladder.sh
Normal file
86
ct/fladder.sh
Normal file
@ -0,0 +1,86 @@
|
||||
#!/usr/bin/env bash
|
||||
source <(curl -fsSL https://raw.githubusercontent.com/wendyliga/ProxmoxVE/main/misc/build.func)
|
||||
# Copyright (c) 2021-2025 community-scripts ORG
|
||||
# Author: wendyliga
|
||||
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
||||
# Source: https://github.com/DonutWare/Fladder
|
||||
|
||||
APP="Fladder"
|
||||
var_tags="${var_tags:-media}"
|
||||
var_cpu="${var_cpu:-2}"
|
||||
var_ram="${var_ram:-2048}"
|
||||
var_disk="${var_disk:-4}"
|
||||
var_os="${var_os:-debian}"
|
||||
var_version="${var_version:-13}"
|
||||
var_unprivileged="${var_unprivileged:-1}"
|
||||
|
||||
header_info "$APP"
|
||||
variables
|
||||
color
|
||||
catch_errors
|
||||
|
||||
function update_script() {
|
||||
header_info
|
||||
check_container_storage
|
||||
check_container_resources
|
||||
|
||||
if [[ ! -d /opt/fladder ]]; then
|
||||
msg_error "No ${APP} Installation Found!"
|
||||
exit
|
||||
fi
|
||||
# Get latest version from GitHub
|
||||
RELEASE=$(curl -fsSL https://api.github.com/repos/DonutWare/Fladder/releases/latest | \
|
||||
grep "tag_name" | awk '{print substr($2, 2, length($2)-3)}')
|
||||
if [[ -z "$RELEASE" ]]; then
|
||||
msg_error "Failed to fetch latest release version from GitHub"
|
||||
exit 1
|
||||
fi
|
||||
if [[ ! -f /opt/${APP}_version.txt ]] || [[ "${RELEASE}" != "$(cat /opt/${APP}_version.txt)" ]]; then
|
||||
msg_info "Stopping Service"
|
||||
systemctl stop nginx
|
||||
msg_ok "Stopped Service"
|
||||
|
||||
msg_info "Backing up configuration"
|
||||
if [[ -f /opt/fladder/assets/config/config.json ]]; then
|
||||
cp /opt/fladder/assets/config/config.json /tmp/fladder_config.json.bak
|
||||
msg_ok "Configuration backed up"
|
||||
elif [[ -f /opt/fladder/data/flutter_assets/config/config.json ]]; then
|
||||
cp /opt/fladder/data/flutter_assets/config/config.json /tmp/fladder_config.json.bak
|
||||
msg_ok "Configuration backed up"
|
||||
fi
|
||||
|
||||
msg_info "Updating ${APP} to ${RELEASE}"
|
||||
cd /opt
|
||||
wget -q "https://github.com/DonutWare/Fladder/releases/download/${RELEASE}/Fladder-Web-${RELEASE#v}.zip"
|
||||
rm -rf /opt/fladder
|
||||
unzip -q "Fladder-Web-${RELEASE#v}.zip" -d fladder
|
||||
rm -f "Fladder-Web-${RELEASE#v}.zip"
|
||||
echo "${RELEASE}" >/opt/${APP}_version.txt
|
||||
msg_ok "Updated ${APP} to ${RELEASE}"
|
||||
|
||||
msg_info "Restoring configuration"
|
||||
if [[ -f /tmp/fladder_config.json.bak ]]; then
|
||||
mkdir -p /opt/fladder/assets/config
|
||||
cp /tmp/fladder_config.json.bak /opt/fladder/assets/config/config.json
|
||||
rm -f /tmp/fladder_config.json.bak
|
||||
msg_ok "Configuration restored"
|
||||
fi
|
||||
|
||||
msg_info "Starting Service"
|
||||
systemctl start nginx
|
||||
msg_ok "Started Service"
|
||||
msg_ok "Updated successfully!"
|
||||
else
|
||||
msg_ok "No update required. ${APP} is already at ${RELEASE}"
|
||||
fi
|
||||
exit
|
||||
}
|
||||
|
||||
start
|
||||
build_container
|
||||
description
|
||||
|
||||
msg_ok "Completed Successfully!\n"
|
||||
echo -e "${CREATING}${GN}${APP} setup has been successfully initialized!${CL}"
|
||||
echo -e "${INFO}${YW} Access it using the following IP:${CL}"
|
||||
echo -e "${TAB}${GATEWAY}${BGN}http://${IP}${CL}"
|
||||
35
frontend/public/json/fladder.json
Normal file
35
frontend/public/json/fladder.json
Normal file
@ -0,0 +1,35 @@
|
||||
{
|
||||
"name": "Fladder",
|
||||
"slug": "fladder",
|
||||
"categories": [
|
||||
14
|
||||
],
|
||||
"date_created": "2025-12-26",
|
||||
"type": "ct",
|
||||
"updateable": true,
|
||||
"privileged": false,
|
||||
"interface_port": 80,
|
||||
"documentation": "https://github.com/DonutWare/Fladder/blob/develop/INSTALL.md#ubuntudebian",
|
||||
"website": "https://github.com/DonutWare/Fladder",
|
||||
"logo": "https://cdn.jsdelivr.net/gh/homarr-labs/dashboard-icons/webp/fladder.webp",
|
||||
"config_path": "/opt/fladder/assets/config/config.json",
|
||||
"description": "Fladder is a simple Jellyfin frontend built on top of Flutter. It provides a modern interface to stream and sync content locally, manage libraries, support multiple profiles, and offers direct, transcode and offline playback with media segments skipping.",
|
||||
"install_methods": [
|
||||
{
|
||||
"type": "default",
|
||||
"script": "ct/fladder.sh",
|
||||
"resources": {
|
||||
"cpu": 2,
|
||||
"ram": 2048,
|
||||
"hdd": 4,
|
||||
"os": "debian",
|
||||
"version": "13"
|
||||
}
|
||||
}
|
||||
],
|
||||
"default_credentials": {
|
||||
"username": null,
|
||||
"password": null
|
||||
},
|
||||
"notes": []
|
||||
}
|
||||
59
install/fladder-install.sh
Normal file
59
install/fladder-install.sh
Normal file
@ -0,0 +1,59 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Copyright (c) 2021-2025 community-scripts ORG
|
||||
# Author: wendyliga
|
||||
# License: MIT | https://github.com/wendyliga/ProxmoxVE/raw/main/LICENSE
|
||||
# Source: https://github.com/DonutWare/Fladder
|
||||
|
||||
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
|
||||
color
|
||||
verb_ip6
|
||||
catch_errors
|
||||
setting_up_container
|
||||
network_check
|
||||
update_os
|
||||
|
||||
msg_info "Installing Dependencies"
|
||||
$STD apt-get install -y \
|
||||
wget \
|
||||
unzip \
|
||||
nginx
|
||||
msg_ok "Installed Dependencies"
|
||||
|
||||
msg_info "Installing ${APPLICATION}"
|
||||
# Get latest version from GitHub
|
||||
RELEASE=$(curl -fsSL https://api.github.com/repos/DonutWare/Fladder/releases/latest | \
|
||||
grep "tag_name" | awk '{print substr($2, 2, length($2)-3)}')
|
||||
cd /opt
|
||||
$STD wget -q "https://github.com/DonutWare/Fladder/releases/download/${RELEASE}/Fladder-Web-${RELEASE#v}.zip"
|
||||
$STD unzip -o "Fladder-Web-${RELEASE#v}.zip" -d fladder
|
||||
|
||||
rm -f "Fladder-Web-${RELEASE#v}.zip"
|
||||
echo "${RELEASE}" >/opt/${APPLICATION}_version.txt
|
||||
msg_ok "Installed ${APPLICATION}"
|
||||
|
||||
msg_info "Configuring Nginx"
|
||||
cat <<EOF >/etc/nginx/conf.d/fladder.conf
|
||||
server {
|
||||
listen 80 default_server;
|
||||
listen [::]:80 default_server;
|
||||
|
||||
server_name _;
|
||||
|
||||
root /opt/fladder;
|
||||
index index.html;
|
||||
|
||||
location / {
|
||||
try_files \$uri \$uri/ /index.html;
|
||||
}
|
||||
}
|
||||
EOF
|
||||
rm -f /etc/nginx/sites-enabled/default
|
||||
rm -f /etc/nginx/sites-available/default
|
||||
systemctl enable -q --now nginx
|
||||
systemctl reload nginx
|
||||
msg_ok "Configured Nginx"
|
||||
|
||||
motd_ssh
|
||||
customize
|
||||
cleanup_lxc
|
||||
Loading…
x
Reference in New Issue
Block a user