From a898a373d55b6bea5f1ca5038eefb5a917488a44 Mon Sep 17 00:00:00 2001
From: Kyle Kroboth
Date: Fri, 7 Mar 2025 21:46:46 -0500
Subject: [PATCH 01/19] chore: json info
---
json/fileflows.json | 39 +++++++++++++++++++++++++++++++++++++++
1 file changed, 39 insertions(+)
create mode 100644 json/fileflows.json
diff --git a/json/fileflows.json b/json/fileflows.json
new file mode 100644
index 0000000..ddc6ca0
--- /dev/null
+++ b/json/fileflows.json
@@ -0,0 +1,39 @@
+{
+ "name": "FileFlows",
+ "slug": "fileflows",
+ "categories": [
+ 13
+ ],
+ "date_created": "2025-03-07",
+ "type": "ct",
+ "updateable": true,
+ "privileged": true,
+ "interface_port": 19200,
+ "documentation": "https://fileflows.com/docs",
+ "website": "https://fileflows.com/",
+ "logo": "https://raw.githubusercontent.com/revenz/FileFlows/refs/heads/develop/icon.png",
+ "description": "FileFlows is a powerful, open-source tool for automating media file processing workflows, including encoding, decoding, and media management. It offers an intuitive GUI and extensive plugin support, making it ideal for tasks like video transcoding, organizing, and managing large media libraries.",
+ "install_methods": [
+ {
+ "type": "default",
+ "script": "ct/fileflows.sh",
+ "resources": {
+ "cpu": 2,
+ "ram": 2,
+ "hdd": 4,
+ "os": "Debian",
+ "version": "12"
+ }
+ }
+ ],
+ "default_credentials": {
+ "username": null,
+ "password": null
+ },
+ "notes": [
+ {
+ "text": "With Privileged/Unprivileged Hardware Acceleration Support",
+ "type": "info"
+ }
+ ]
+}
From 17125a45bd4255a85bbb8a0861a3993e240f7a59 Mon Sep 17 00:00:00 2001
From: Kyle Kroboth
Date: Fri, 7 Mar 2025 22:52:36 -0500
Subject: [PATCH 02/19] feat: fileflows ct and install
Testing if this works
---
ct/fileflows.sh | 77 ++++++++++++++++++++++++++++++++++++
install/fileflows-install.sh | 67 +++++++++++++++++++++++++++++++
2 files changed, 144 insertions(+)
create mode 100644 ct/fileflows.sh
create mode 100644 install/fileflows-install.sh
diff --git a/ct/fileflows.sh b/ct/fileflows.sh
new file mode 100644
index 0000000..7906302
--- /dev/null
+++ b/ct/fileflows.sh
@@ -0,0 +1,77 @@
+#!/usr/bin/env bash
+source <(curl -s https://raw.githubusercontent.com/kkroboth/ProxmoxVED/main/misc/build.func)
+# Copyright (c) 2021-2025 community-scripts ORG
+# Author: kkroboth
+# License: MIT | https://github.com/community-scripts/ProxmoxVED/raw/main/LICENSE
+# Source: https://fileflows.com/
+
+APP="FileFlows"
+var_tags="media;automation"
+var_cpu="2"
+var_ram="2048"
+var_disk="4"
+var_os="debian"
+var_version="12"
+var_unprivileged="1"
+
+header_info "$APP"
+variables
+color
+catch_errors
+
+function update_script() {
+ header_info
+ check_container_storage
+ check_container_resources
+
+ # Check if installation is present | -f for file, -d for folder
+ if [[ ! -f [INSTALLATION_CHECK_PATH] ]]; then
+ msg_error "No ${APP} Installation Found!"
+ exit
+ fi
+
+ # Crawling the new version and checking whether an update is required
+ RELEASE=$(curl -fsSL [RELEASE_URL] | [PARSE_RELEASE_COMMAND])
+ if [[ "${RELEASE}" != "$(cat /opt/${APP}_version.txt)" ]] || [[ ! -f /opt/${APP}_version.txt ]]; then
+ # Stopping Services
+ msg_info "Stopping $APP"
+ systemctl stop [SERVICE_NAME]
+ msg_ok "Stopped $APP"
+
+ # Creating Backup
+ msg_info "Creating Backup"
+ tar -czf "/opt/${APP}_backup_$(date +%F).tar.gz" [IMPORTANT_PATHS]
+ msg_ok "Backup Created"
+
+ # Execute Update
+ msg_info "Updating $APP to v${RELEASE}"
+ [UPDATE_COMMANDS]
+ msg_ok "Updated $APP to v${RELEASE}"
+
+ # Starting Services
+ msg_info "Starting $APP"
+ systemctl start [SERVICE_NAME]
+ msg_ok "Started $APP"
+
+ # Cleaning up
+ msg_info "Cleaning Up"
+ rm -rf [TEMP_FILES]
+ msg_ok "Cleanup Completed"
+
+ # Last Action
+ echo "${RELEASE}" >/opt/${APP}_version.txt
+ msg_ok "Update Successful"
+ else
+ msg_ok "No update required. ${APP} is already at v${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 URL:${CL}"
+echo -e "${TAB}${GATEWAY}${BGN}http://${IP}:[PORT]${CL}"
diff --git a/install/fileflows-install.sh b/install/fileflows-install.sh
new file mode 100644
index 0000000..f5f0a04
--- /dev/null
+++ b/install/fileflows-install.sh
@@ -0,0 +1,67 @@
+#!/usr/bin/env bash
+
+# Copyright (c) 2021-2025 community-scripts ORG
+# Author: kkroboth
+# License: MIT | https://github.com/community-scripts/ProxmoxVED/raw/main/LICENSE
+# Source: https://fileflows.com/
+
+# Import Functions und Setup
+source /dev/stdin <<< "$FUNCTIONS_FILE_PATH"
+color
+verb_ip6
+catch_errors
+setting_up_container
+network_check
+update_os
+
+# Installing Dependencies with the 3 core dependencies (curl;sudo;mc)
+msg_info "Installing Dependencies"
+$STD apt-get install -y \
+ curl \
+ sudo \
+ mc
+msg_ok "Installed Dependencies"
+
+msg_info "Installing ASP.NET Core Runtime"
+wget -q https://packages.microsoft.com/config/debian/12/packages-microsoft-prod.deb -O packages-microsoft-prod.deb
+$STD dpkg -i packages-microsoft-prod.deb
+rm -rf packages-microsoft-prod.deb
+$STD apt-get update
+$STD apt-get install -y aspnetcore-runtime-8.0
+msg_ok "Installed ASP.NET Core Runtime"
+
+# Setup App
+msg_info "Setup ${APPLICATION}"
+temp_file=$(mktemp)
+wget -q https://fileflows.com/downloads/zip -O $temp_file
+unzip -q -d /opt/fileflows $temp_file
+chmod +x /opt/fileflows/run-server.sh
+msg_ok "Setup ${APPLICATION}"
+
+# Creating Service
+msg_info "Creating Service"
+cat </etc/systemd/system/${APPLICATION}.service
+[Unit]
+Description=${APPLICATION} Service
+After=network.target
+
+[Service]
+WorkingDirectory=/opt/wastebin
+ExecStart=dotnet FileFlows.Server.dll
+Restart=always
+
+[Install]
+WantedBy=multi-user.target
+EOF
+systemctl enable -q --now ${APPLICATION}.service
+msg_ok "Created Service"
+
+motd_ssh
+customize
+
+# Cleanup
+msg_info "Cleaning up"
+rm -f $temp_file
+$STD apt-get -y autoremove
+$STD apt-get -y autoclean
+msg_ok "Cleaned"
From 0a2722ee95bf7d685989d116fba60cd49d8e7e3a Mon Sep 17 00:00:00 2001
From: Kyle Kroboth
Date: Fri, 7 Mar 2025 23:34:33 -0500
Subject: [PATCH 03/19] fix: update build.func link
---
ct/fileflows.sh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/ct/fileflows.sh b/ct/fileflows.sh
index 7906302..f418786 100644
--- a/ct/fileflows.sh
+++ b/ct/fileflows.sh
@@ -1,5 +1,5 @@
#!/usr/bin/env bash
-source <(curl -s https://raw.githubusercontent.com/kkroboth/ProxmoxVED/main/misc/build.func)
+source <(curl -s https://raw.githubusercontent.com/kkroboth/ProxmoxVED/refs/heads/lxc-fileflows/misc/build.func)
# Copyright (c) 2021-2025 community-scripts ORG
# Author: kkroboth
# License: MIT | https://github.com/community-scripts/ProxmoxVED/raw/main/LICENSE
From 9ff05c6cc9f805eb7bddff82f8eddb12ca272bdb Mon Sep 17 00:00:00 2001
From: Kyle Kroboth
Date: Sat, 8 Mar 2025 00:16:14 -0500
Subject: [PATCH 04/19] fix: hardware accel and naming issues
---
install/fileflows-install.sh | 34 ++++++++++++++++++++++++++++++----
misc/build.func | 8 ++++----
2 files changed, 34 insertions(+), 8 deletions(-)
diff --git a/install/fileflows-install.sh b/install/fileflows-install.sh
index f5f0a04..cefe333 100644
--- a/install/fileflows-install.sh
+++ b/install/fileflows-install.sh
@@ -22,6 +22,30 @@ $STD apt-get install -y \
mc
msg_ok "Installed Dependencies"
+msg_info "Installing FFmpeg (Patience)"
+wget -q https://www.deb-multimedia.org/pool/main/d/deb-multimedia-keyring/deb-multimedia-keyring_2016.8.1_all.deb
+$STD dpkg -i deb-multimedia-keyring_2016.8.1_all.deb
+cat </etc/apt/sources.list.d/backports.list
+deb https://www.deb-multimedia.org bookworm main non-free
+deb https://www.deb-multimedia.org bookworm-backports main
+EOF
+$STD apt update
+DEBIAN_FRONTEND=noninteractive $STD apt-get install -t bookworm-backports ffmpeg -y
+rm -rf /etc/apt/sources.list.d/backports.list deb-multimedia-keyring_2016.8.1_all.deb
+$STD apt update
+msg_ok "Installed FFmpeg"
+
+msg_info "Setting Up Hardware Acceleration"
+$STD apt-get -y install {va-driver-all,ocl-icd-libopencl1,intel-opencl-icd,vainfo,intel-gpu-tools}
+if [[ "$CTTYPE" == "0" ]]; then
+ chgrp video /dev/dri
+ chmod 755 /dev/dri
+ chmod 660 /dev/dri/*
+ $STD adduser $(id -u -n) video
+ $STD adduser $(id -u -n) render
+fi
+msg_ok "Set Up Hardware Acceleration"
+
msg_info "Installing ASP.NET Core Runtime"
wget -q https://packages.microsoft.com/config/debian/12/packages-microsoft-prod.deb -O packages-microsoft-prod.deb
$STD dpkg -i packages-microsoft-prod.deb
@@ -40,20 +64,22 @@ msg_ok "Setup ${APPLICATION}"
# Creating Service
msg_info "Creating Service"
-cat </etc/systemd/system/${APPLICATION}.service
+cat </etc/systemd/system/fileflows.service
[Unit]
Description=${APPLICATION} Service
After=network.target
[Service]
-WorkingDirectory=/opt/wastebin
-ExecStart=dotnet FileFlows.Server.dll
+WorkingDirectory=/opt/fileflows
+ExecStart=/opt/fileflows/fileflows-systemd-entrypoint.sh
+SyslogIdentifier=FileFlows
Restart=always
+RestartSec=10
[Install]
WantedBy=multi-user.target
EOF
-systemctl enable -q --now ${APPLICATION}.service
+systemctl enable -q --now fileflows.service
msg_ok "Created Service"
motd_ssh
diff --git a/misc/build.func b/misc/build.func
index bd55da0..6b82441 100644
--- a/misc/build.func
+++ b/misc/build.func
@@ -1135,7 +1135,7 @@ EOF
fi
if [ "$CT_TYPE" == "0" ]; then
- if [[ "$APP" == "Channels" || "$APP" == "Emby" || "$APP" == "ErsatzTV" || "$APP" == "Frigate" || "$APP" == "Jellyfin" || "$APP" == "Plex" || "$APP" == "Scrypted" || "$APP" == "Tdarr" || "$APP" == "Unmanic" || "$APP" == "Ollama" ]]; then
+ if [[ "$APP" == "Channels" || "$APP" == "Emby" || "$APP" == "ErsatzTV" || "$APP" == "Frigate" || "$APP" == "Jellyfin" || "$APP" == "Plex" || "$APP" == "Scrypted" || "$APP" == "Tdarr" || "$APP" == "Unmanic" || "$APP" == "Ollama" || "$APP" == "FileFlows" ]]; then
cat <>$LXC_CONFIG
# VAAPI hardware transcoding
lxc.cgroup2.devices.allow: c 226:0 rwm
@@ -1147,7 +1147,7 @@ lxc.mount.entry: /dev/dri/renderD128 dev/dri/renderD128 none bind,optional,creat
EOF
fi
else
- if [[ "$APP" == "Channels" || "$APP" == "Emby" || "$APP" == "ErsatzTV" || "$APP" == "Frigate" || "$APP" == "Jellyfin" || "$APP" == "Plex" || "$APP" == "Scrypted" || "$APP" == "Tdarr" || "$APP" == "Unmanic" || "$APP" == "Ollama" ]]; then
+ if [[ "$APP" == "Channels" || "$APP" == "Emby" || "$APP" == "ErsatzTV" || "$APP" == "Frigate" || "$APP" == "Jellyfin" || "$APP" == "Plex" || "$APP" == "Scrypted" || "$APP" == "Tdarr" || "$APP" == "Unmanic" || "$APP" == "Ollama" || "$APP" == "FileFlows" ]]; then
if [[ -e "/dev/dri/renderD128" ]]; then
if [[ -e "/dev/dri/card0" ]]; then
cat <>$LXC_CONFIG
@@ -1201,7 +1201,7 @@ description() {
-
+
GitHub
@@ -1250,7 +1250,7 @@ exit_script() {
#200 exit codes indicate error in create_lxc.sh
#100 exit codes indicate error in install.func
- if [ $exit_code -ne 0 ]; then
+ if [ $exit_code -ne 0 ]; then
case $exit_code in
100) post_update_to_api "failed" "100: Unexpected error in create_lxc.sh" ;;
101) post_update_to_api "failed" "101: No network connection detected in create_lxc.sh" ;;
From 8d22ce9ba9d11d3768f9a83b0a397a4cf70c4383 Mon Sep 17 00:00:00 2001
From: Kyle Kroboth
Date: Sat, 8 Mar 2025 23:58:31 -0500
Subject: [PATCH 05/19] chore: fileflows update script
---
ct/fileflows.sh | 31 ++++++++++++++++---------------
install/fileflows-install.sh | 5 +++--
2 files changed, 19 insertions(+), 17 deletions(-)
diff --git a/ct/fileflows.sh b/ct/fileflows.sh
index f418786..fb458a4 100644
--- a/ct/fileflows.sh
+++ b/ct/fileflows.sh
@@ -25,45 +25,46 @@ function update_script() {
check_container_resources
# Check if installation is present | -f for file, -d for folder
- if [[ ! -f [INSTALLATION_CHECK_PATH] ]]; then
+ if [[ ! -d /opt/fileflows ]]; then
msg_error "No ${APP} Installation Found!"
exit
fi
- # Crawling the new version and checking whether an update is required
- RELEASE=$(curl -fsSL [RELEASE_URL] | [PARSE_RELEASE_COMMAND])
- if [[ "${RELEASE}" != "$(cat /opt/${APP}_version.txt)" ]] || [[ ! -f /opt/${APP}_version.txt ]]; then
- # Stopping Services
+ UPDATE_AVAILABLE=$(curl -s -X 'GET' "http://${IP}:19200/api/status/update-available" -H 'accept: application/json' | jq .UpdateAvailable)
+ if [[ "${UPDATE_AVAILABLE}" == "true" ]]; then
msg_info "Stopping $APP"
- systemctl stop [SERVICE_NAME]
+ systemctl stop fileflows
msg_ok "Stopped $APP"
# Creating Backup
msg_info "Creating Backup"
- tar -czf "/opt/${APP}_backup_$(date +%F).tar.gz" [IMPORTANT_PATHS]
+ tar -czf "/opt/${APP}_backup_$(date +%F).tar.gz" -C /opt/fileflows Data
msg_ok "Backup Created"
# Execute Update
- msg_info "Updating $APP to v${RELEASE}"
- [UPDATE_COMMANDS]
- msg_ok "Updated $APP to v${RELEASE}"
+ msg_info "Updating $APP to latest version"
+ temp_file=$(mktemp)
+ wget -q https://fileflows.com/downloads/zip -O $temp_file
+ unzip -oq -d /opt/fileflows $temp_file
+ chmod +x /opt/fileflows/fileflows-systemd-entrypoint.sh
+ msg_ok "Updated $APP to latest version"
# Starting Services
msg_info "Starting $APP"
- systemctl start [SERVICE_NAME]
+ systemctl start fileflows
msg_ok "Started $APP"
# Cleaning up
msg_info "Cleaning Up"
- rm -rf [TEMP_FILES]
+ rm -rf $temp_file
msg_ok "Cleanup Completed"
# Last Action
- echo "${RELEASE}" >/opt/${APP}_version.txt
msg_ok "Update Successful"
else
- msg_ok "No update required. ${APP} is already at v${RELEASE}"
+ msg_ok "No update required. ${APP} is already at latest version"
fi
+
exit
}
@@ -74,4 +75,4 @@ 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 URL:${CL}"
-echo -e "${TAB}${GATEWAY}${BGN}http://${IP}:[PORT]${CL}"
+echo -e "${TAB}${GATEWAY}${BGN}http://${IP}:19200${CL}"
diff --git a/install/fileflows-install.sh b/install/fileflows-install.sh
index cefe333..23d56ed 100644
--- a/install/fileflows-install.sh
+++ b/install/fileflows-install.sh
@@ -19,7 +19,8 @@ msg_info "Installing Dependencies"
$STD apt-get install -y \
curl \
sudo \
- mc
+ mc \
+ jq # Used for updating checking from json response
msg_ok "Installed Dependencies"
msg_info "Installing FFmpeg (Patience)"
@@ -59,7 +60,7 @@ msg_info "Setup ${APPLICATION}"
temp_file=$(mktemp)
wget -q https://fileflows.com/downloads/zip -O $temp_file
unzip -q -d /opt/fileflows $temp_file
-chmod +x /opt/fileflows/run-server.sh
+chmod +x /opt/fileflows/fileflows-systemd-entrypoint.sh
msg_ok "Setup ${APPLICATION}"
# Creating Service
From 5d189e5d604592d59146eea43debf9e887ba3399 Mon Sep 17 00:00:00 2001
From: Kyle Kroboth
Date: Sun, 9 Mar 2025 00:42:13 -0500
Subject: [PATCH 06/19] test: update misc links
---
misc/build.func | 14 +++++++-------
misc/install.func | 2 +-
2 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/misc/build.func b/misc/build.func
index 6b82441..2511838 100644
--- a/misc/build.func
+++ b/misc/build.func
@@ -14,7 +14,7 @@ variables() {
RANDOM_UUID="$(cat /proc/sys/kernel/random/uuid)" # generates a random UUID and sets it to the RANDOM_UUID variable.
}
-source <(curl -s https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/misc/api.func)
+source <(curl -s https://raw.githubusercontent.com/kkroboth/ProxmoxVED/refs/heads/lxc-fileflows/misc/api.func)
# This function sets various color variables using ANSI escape codes for formatting text in the terminal.
color() {
@@ -69,7 +69,7 @@ catch_errors() {
# This function is called when an error occurs. It receives the exit code, line number, and command that caused the error, and displays an error message.
error_handler() {
- source /dev/stdin <<<$(wget -qLO - https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/misc/api.func)
+ source /dev/stdin <<<$(wget -qLO - https://raw.githubusercontent.com/kkroboth/ProxmoxVED/refs/heads/lxc-fileflows/misc/api.func)
if [ -n "$SPINNER_PID" ] && ps -p $SPINNER_PID >/dev/null; then kill $SPINNER_PID >/dev/null; fi
printf "\e[?25h"
local exit_code="$?"
@@ -1082,9 +1082,9 @@ build_container() {
TEMP_DIR=$(mktemp -d)
pushd $TEMP_DIR >/dev/null
if [ "$var_os" == "alpine" ]; then
- export FUNCTIONS_FILE_PATH="$(curl -s https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/misc/alpine-install.func)"
+ export FUNCTIONS_FILE_PATH="$(curl -s https://raw.githubusercontent.com/kkroboth/ProxmoxVED/refs/heads/lxc-fileflows/misc/alpine-install.func)"
else
- export FUNCTIONS_FILE_PATH="$(curl -s https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/misc/install.func)"
+ export FUNCTIONS_FILE_PATH="$(curl -s https://raw.githubusercontent.com/kkroboth/ProxmoxVED/refs/heads/lxc-fileflows/misc/install.func)"
fi
export RANDOM_UUID="$RANDOM_UUID"
export CACHER="$APT_CACHER"
@@ -1116,7 +1116,7 @@ build_container() {
$PW
"
# This executes create_lxc.sh and creates the container and .conf file
- bash -c "$(wget -qLO - https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/ct/create_lxc.sh)" || exit $?
+ bash -c "$(wget -qLO - https://raw.githubusercontent.com/kkroboth/ProxmoxVED/refs/heads/lxc-fileflows/ct/create_lxc.sh)" || exit $?
LXC_CONFIG=/etc/pve/lxc/${CTID}.conf
if [ "$CT_TYPE" == "0" ]; then
@@ -1178,7 +1178,7 @@ http://dl-cdn.alpinelinux.org/alpine/latest-stable/community
EOF'
pct exec "$CTID" -- ash -c "apk add bash >/dev/null"
fi
- lxc-attach -n "$CTID" -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/install/$var_install.sh)" || exit $?
+ lxc-attach -n "$CTID" -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/kkroboth/ProxmoxVED/refs/heads/lxc-fileflows/install/$var_install.sh)" || exit $?
}
@@ -1191,7 +1191,7 @@ description() {
cat <
-
+
${APP} LXC
diff --git a/misc/install.func b/misc/install.func
index 98e4418..f37d199 100644
--- a/misc/install.func
+++ b/misc/install.func
@@ -68,7 +68,7 @@ catch_errors() {
# This function handles errors
error_handler() {
- source <(wget -qLO - https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/misc/api.func)
+ source <(wget -qLO - https://raw.githubusercontent.com/kkroboth/ProxmoxVED/refs/heads/lxc-fileflows/misc/api.func)
if [ -n "$SPINNER_PID" ] && ps -p $SPINNER_PID >/dev/null; then kill $SPINNER_PID >/dev/null; fi
printf "\e[?25h"
local exit_code="$?"
From dfe9980f09676777e0047fdb56bb2523cbba82e0 Mon Sep 17 00:00:00 2001
From: Kyle Kroboth
Date: Sun, 9 Mar 2025 00:51:20 -0500
Subject: [PATCH 07/19] fix: use built-in systemd installer
---
ct/fileflows.sh | 1 -
install/fileflows-install.sh | 18 ++----------------
2 files changed, 2 insertions(+), 17 deletions(-)
diff --git a/ct/fileflows.sh b/ct/fileflows.sh
index fb458a4..6f70fda 100644
--- a/ct/fileflows.sh
+++ b/ct/fileflows.sh
@@ -46,7 +46,6 @@ function update_script() {
temp_file=$(mktemp)
wget -q https://fileflows.com/downloads/zip -O $temp_file
unzip -oq -d /opt/fileflows $temp_file
- chmod +x /opt/fileflows/fileflows-systemd-entrypoint.sh
msg_ok "Updated $APP to latest version"
# Starting Services
diff --git a/install/fileflows-install.sh b/install/fileflows-install.sh
index 23d56ed..a4c6565 100644
--- a/install/fileflows-install.sh
+++ b/install/fileflows-install.sh
@@ -60,26 +60,12 @@ msg_info "Setup ${APPLICATION}"
temp_file=$(mktemp)
wget -q https://fileflows.com/downloads/zip -O $temp_file
unzip -q -d /opt/fileflows $temp_file
-chmod +x /opt/fileflows/fileflows-systemd-entrypoint.sh
+(cd /opt/fileflows/Server && dotnet FileFlows.Server.dll --systemd install --root true)
msg_ok "Setup ${APPLICATION}"
# Creating Service
msg_info "Creating Service"
-cat </etc/systemd/system/fileflows.service
-[Unit]
-Description=${APPLICATION} Service
-After=network.target
-
-[Service]
-WorkingDirectory=/opt/fileflows
-ExecStart=/opt/fileflows/fileflows-systemd-entrypoint.sh
-SyslogIdentifier=FileFlows
-Restart=always
-RestartSec=10
-
-[Install]
-WantedBy=multi-user.target
-EOF
+(cd /opt/fileflows/Server && dotnet FileFlows.Server.dll --systemd install --root true)
systemctl enable -q --now fileflows.service
msg_ok "Created Service"
From cb95b41f9217efbda8f6f6f91c995ad58c94d942 Mon Sep 17 00:00:00 2001
From: kkroboth
Date: Tue, 11 Mar 2025 20:49:11 -0400
Subject: [PATCH 08/19] chore: update multimedia keys
---
install/fileflows-install.sh | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/install/fileflows-install.sh b/install/fileflows-install.sh
index a4c6565..6815afd 100644
--- a/install/fileflows-install.sh
+++ b/install/fileflows-install.sh
@@ -24,8 +24,8 @@ $STD apt-get install -y \
msg_ok "Installed Dependencies"
msg_info "Installing FFmpeg (Patience)"
-wget -q https://www.deb-multimedia.org/pool/main/d/deb-multimedia-keyring/deb-multimedia-keyring_2016.8.1_all.deb
-$STD dpkg -i deb-multimedia-keyring_2016.8.1_all.deb
+wget https://www.deb-multimedia.org/pool/main/d/deb-multimedia-keyring/deb-multimedia-keyring_2024.9.1_all.deb
+$STD dpkg -i deb-multimedia-keyring_2024.9.1_all.deb
cat </etc/apt/sources.list.d/backports.list
deb https://www.deb-multimedia.org bookworm main non-free
deb https://www.deb-multimedia.org bookworm-backports main
From 7691f655fc4cf944f78d748d7c498a9f66cc1c8d Mon Sep 17 00:00:00 2001
From: Kyle Kroboth
Date: Tue, 11 Mar 2025 21:22:14 -0400
Subject: [PATCH 09/19] fix: use non-free intel va driver
---
install/fileflows-install.sh | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/install/fileflows-install.sh b/install/fileflows-install.sh
index 6815afd..26c7c3f 100644
--- a/install/fileflows-install.sh
+++ b/install/fileflows-install.sh
@@ -37,7 +37,19 @@ $STD apt update
msg_ok "Installed FFmpeg"
msg_info "Setting Up Hardware Acceleration"
-$STD apt-get -y install {va-driver-all,ocl-icd-libopencl1,intel-opencl-icd,vainfo,intel-gpu-tools}
+cat </etc/apt/sources.list.d/non-free.list
+
+deb http://deb.debian.org/debian bookworm main contrib non-free non-free-firmware
+deb-src http://deb.debian.org/debian bookworm main contrib non-free non-free-firmware
+
+deb http://deb.debian.org/debian-security bookworm-security main contrib non-free non-free-firmware
+deb-src http://deb.debian.org/debian-security bookworm-security main contrib non-free non-free-firmware
+
+deb http://deb.debian.org/debian bookworm-updates main contrib non-free non-free-firmware
+deb-src http://deb.debian.org/debian bookworm-updates main contrib non-free non-free-firmware
+EOF
+$STD apt-get update
+$STD apt-get -y install {intel-media-va-driver-non-free,ocl-icd-libopencl1,intel-opencl-icd,vainfo,intel-gpu-tools}
if [[ "$CTTYPE" == "0" ]]; then
chgrp video /dev/dri
chmod 755 /dev/dri
From 5f1f6d3684aa73e3b402bae906ea07952b1882ac Mon Sep 17 00:00:00 2001
From: Kyle Kroboth
Date: Tue, 11 Mar 2025 21:31:23 -0400
Subject: [PATCH 10/19] fix: quiet logs and remove duplicate service install
---
install/fileflows-install.sh | 9 ++-------
1 file changed, 2 insertions(+), 7 deletions(-)
diff --git a/install/fileflows-install.sh b/install/fileflows-install.sh
index 26c7c3f..bcb7c3a 100644
--- a/install/fileflows-install.sh
+++ b/install/fileflows-install.sh
@@ -24,7 +24,7 @@ $STD apt-get install -y \
msg_ok "Installed Dependencies"
msg_info "Installing FFmpeg (Patience)"
-wget https://www.deb-multimedia.org/pool/main/d/deb-multimedia-keyring/deb-multimedia-keyring_2024.9.1_all.deb
+wget -q https://www.deb-multimedia.org/pool/main/d/deb-multimedia-keyring/deb-multimedia-keyring_2024.9.1_all.deb
$STD dpkg -i deb-multimedia-keyring_2024.9.1_all.deb
cat </etc/apt/sources.list.d/backports.list
deb https://www.deb-multimedia.org bookworm main non-free
@@ -73,13 +73,8 @@ temp_file=$(mktemp)
wget -q https://fileflows.com/downloads/zip -O $temp_file
unzip -q -d /opt/fileflows $temp_file
(cd /opt/fileflows/Server && dotnet FileFlows.Server.dll --systemd install --root true)
-msg_ok "Setup ${APPLICATION}"
-
-# Creating Service
-msg_info "Creating Service"
-(cd /opt/fileflows/Server && dotnet FileFlows.Server.dll --systemd install --root true)
systemctl enable -q --now fileflows.service
-msg_ok "Created Service"
+msg_ok "Setup ${APPLICATION}"
motd_ssh
customize
From 19c92a47803814e3e903bbb41d4dfe1dee24babf Mon Sep 17 00:00:00 2001
From: Kyle Kroboth
Date: Tue, 11 Mar 2025 23:02:53 -0400
Subject: [PATCH 11/19] chore: option to install non-free HW accel
---
install/fileflows-install.sh | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/install/fileflows-install.sh b/install/fileflows-install.sh
index bcb7c3a..e55f759 100644
--- a/install/fileflows-install.sh
+++ b/install/fileflows-install.sh
@@ -37,6 +37,10 @@ $STD apt update
msg_ok "Installed FFmpeg"
msg_info "Setting Up Hardware Acceleration"
+
+read -r -p "Do you need the intel-media-va-driver-non-free driver (Debian 12 only)? " prompt
+if [[ ${prompt,,} =~ ^(y|yes)$ ]]; then
+ msg_info "Installing Hardware Acceleration (non-free)"
cat </etc/apt/sources.list.d/non-free.list
deb http://deb.debian.org/debian bookworm main contrib non-free non-free-firmware
@@ -50,6 +54,11 @@ deb-src http://deb.debian.org/debian bookworm-updates main contrib non-free non-
EOF
$STD apt-get update
$STD apt-get -y install {intel-media-va-driver-non-free,ocl-icd-libopencl1,intel-opencl-icd,vainfo,intel-gpu-tools}
+else
+ msg_info "Installing Hardware Acceleration"
+$STD apt-get -y install {va-driver-all,ocl-icd-libopencl1,intel-opencl-icd,vainfo,intel-gpu-tools}
+fi
+
if [[ "$CTTYPE" == "0" ]]; then
chgrp video /dev/dri
chmod 755 /dev/dri
@@ -57,6 +66,7 @@ if [[ "$CTTYPE" == "0" ]]; then
$STD adduser $(id -u -n) video
$STD adduser $(id -u -n) render
fi
+msg_ok "Installed Hardware Acceleration"
msg_ok "Set Up Hardware Acceleration"
msg_info "Installing ASP.NET Core Runtime"
From b56d48950680974b57af5cc3611d41f648c0981b Mon Sep 17 00:00:00 2001
From: Kyle Kroboth
Date: Tue, 11 Mar 2025 23:42:08 -0400
Subject: [PATCH 12/19] fix: set up ffmpeg and ffprobe to correct paths
---
install/fileflows-install.sh | 57 ++++++++++++++++++++++++++++++++++++
1 file changed, 57 insertions(+)
diff --git a/install/fileflows-install.sh b/install/fileflows-install.sh
index e55f759..4bd1e1b 100644
--- a/install/fileflows-install.sh
+++ b/install/fileflows-install.sh
@@ -14,6 +14,19 @@ setting_up_container
network_check
update_os
+wait_for_api() {
+ echo "Waiting for API to become available..."
+ while true; do
+ HTTP_STATUS=$(curl -s -o /dev/null -w "%{http_code}" "http://${IP}:19200/api/system/info")
+ if [ "$HTTP_STATUS" -eq 200 ]; then
+ echo "API is now available!"
+ break
+ fi
+ echo "API not ready yet (status: $HTTP_STATUS). Retrying in 5 seconds..."
+ sleep 5
+ done
+}
+
# Installing Dependencies with the 3 core dependencies (curl;sudo;mc)
msg_info "Installing Dependencies"
$STD apt-get install -y \
@@ -86,6 +99,50 @@ unzip -q -d /opt/fileflows $temp_file
systemctl enable -q --now fileflows.service
msg_ok "Setup ${APPLICATION}"
+# Modify ffmpeg and ffprobe variables so they point to correct locations
+msg_info "Setting ffmpeg variables in fileflows"
+wait_for_api
+
+FFMPEG_UID=$(curl -s -X 'GET' "http://${IP}:19200/api/variable/name/ffmpeg" -H 'accept: application/json' | jq -r '.Uid')
+echo "ffmpeg UID: $FFMPEG_UID"
+
+FFPROBE_UID=$(curl -s -X 'GET' "http://${IP}:19200/api/variable/name/ffprobe" -H 'accept: application/json' | jq -r '.Uid')
+echo "ffprobe UID: $FFPROBE_UID"
+
+curl -X 'DELETE' \
+ "http://${IP}:19200/api/variable" \
+ -H 'accept: */*' \
+ -H 'Content-Type: application/json' \
+ -d "{
+ \"Uids\": [
+ \"$FFMPEG_UID\",
+ \"$FFPROBE_UID\"
+ ]
+}"
+
+FFMPEG_PATH=$(which ffmpeg)
+FFPROBE_PATH=$(which ffprobe)
+
+curl -X 'POST' \
+ "http://${IP}:19200/api/variable" \
+ -H 'accept: */*' \
+ -H 'Content-Type: application/json' \
+ -d "{
+ \"Name\": \"ffmpeg\",
+ \"Value\": \"$FFMPEG_PATH\"
+}"
+
+curl -X 'POST' \
+ "http://${IP}:19200/api/variable" \
+ -H 'accept: */*' \
+ -H 'Content-Type: application/json' \
+ -d "{
+ \"Name\": \"ffprobe\",
+ \"Value\": \"$FFPROBE_PATH\"
+}"
+
+echo "ffmpeg and ffprobe variables have been updated successfully."
+
motd_ssh
customize
From ca686af9ee0c99de56f6e0bce11a4dd0d06c9219 Mon Sep 17 00:00:00 2001
From: Kyle Kroboth
Date: Tue, 11 Mar 2025 23:47:34 -0400
Subject: [PATCH 13/19] fix: use localhost
---
install/fileflows-install.sh | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/install/fileflows-install.sh b/install/fileflows-install.sh
index 4bd1e1b..d5f8be0 100644
--- a/install/fileflows-install.sh
+++ b/install/fileflows-install.sh
@@ -17,7 +17,7 @@ update_os
wait_for_api() {
echo "Waiting for API to become available..."
while true; do
- HTTP_STATUS=$(curl -s -o /dev/null -w "%{http_code}" "http://${IP}:19200/api/system/info")
+ HTTP_STATUS=$(curl -s -o /dev/null -w "%{http_code}" "http://localhost:19200/api/system/info")
if [ "$HTTP_STATUS" -eq 200 ]; then
echo "API is now available!"
break
@@ -103,14 +103,14 @@ msg_ok "Setup ${APPLICATION}"
msg_info "Setting ffmpeg variables in fileflows"
wait_for_api
-FFMPEG_UID=$(curl -s -X 'GET' "http://${IP}:19200/api/variable/name/ffmpeg" -H 'accept: application/json' | jq -r '.Uid')
+FFMPEG_UID=$(curl -s -X 'GET' "http://localhost:19200/api/variable/name/ffmpeg" -H 'accept: application/json' | jq -r '.Uid')
echo "ffmpeg UID: $FFMPEG_UID"
-FFPROBE_UID=$(curl -s -X 'GET' "http://${IP}:19200/api/variable/name/ffprobe" -H 'accept: application/json' | jq -r '.Uid')
+FFPROBE_UID=$(curl -s -X 'GET' "http://localhost:19200/api/variable/name/ffprobe" -H 'accept: application/json' | jq -r '.Uid')
echo "ffprobe UID: $FFPROBE_UID"
curl -X 'DELETE' \
- "http://${IP}:19200/api/variable" \
+ "http://localhost:19200/api/variable" \
-H 'accept: */*' \
-H 'Content-Type: application/json' \
-d "{
@@ -124,7 +124,7 @@ FFMPEG_PATH=$(which ffmpeg)
FFPROBE_PATH=$(which ffprobe)
curl -X 'POST' \
- "http://${IP}:19200/api/variable" \
+ "http://localhost:19200/api/variable" \
-H 'accept: */*' \
-H 'Content-Type: application/json' \
-d "{
@@ -133,7 +133,7 @@ curl -X 'POST' \
}"
curl -X 'POST' \
- "http://${IP}:19200/api/variable" \
+ "http://localhost:19200/api/variable" \
-H 'accept: */*' \
-H 'Content-Type: application/json' \
-d "{
From c00bb973432b093dbd00d022ff1d92c0cfc80b53 Mon Sep 17 00:00:00 2001
From: Kyle Kroboth
Date: Tue, 11 Mar 2025 23:54:48 -0400
Subject: [PATCH 14/19] fix: ignore errors
---
install/fileflows-install.sh | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/install/fileflows-install.sh b/install/fileflows-install.sh
index d5f8be0..69afefa 100644
--- a/install/fileflows-install.sh
+++ b/install/fileflows-install.sh
@@ -15,14 +15,14 @@ network_check
update_os
wait_for_api() {
- echo "Waiting for API to become available..."
+ msg_info "Waiting for API to become available..."
while true; do
- HTTP_STATUS=$(curl -s -o /dev/null -w "%{http_code}" "http://localhost:19200/api/system/info")
+ HTTP_STATUS=$(curl -s -o /dev/null -w "%{http_code}" "http://localhost:19200/api/system/info" 2>/dev/null || echo "000")
if [ "$HTTP_STATUS" -eq 200 ]; then
- echo "API is now available!"
+ msg_info "API is now available!"
break
fi
- echo "API not ready yet (status: $HTTP_STATUS). Retrying in 5 seconds..."
+ msg_info "API not ready yet (status: $HTTP_STATUS). Retrying in 5 seconds..."
sleep 5
done
}
@@ -141,7 +141,7 @@ curl -X 'POST' \
\"Value\": \"$FFPROBE_PATH\"
}"
-echo "ffmpeg and ffprobe variables have been updated successfully."
+msg_ok "ffmpeg and ffprobe variables have been updated successfully."
motd_ssh
customize
From d3382ec5187e542ee420c50d408df536fe37c865 Mon Sep 17 00:00:00 2001
From: Kyle Kroboth
Date: Tue, 11 Mar 2025 23:58:30 -0400
Subject: [PATCH 15/19] fix: silent curl
---
install/fileflows-install.sh | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/install/fileflows-install.sh b/install/fileflows-install.sh
index 69afefa..dc501cb 100644
--- a/install/fileflows-install.sh
+++ b/install/fileflows-install.sh
@@ -109,7 +109,7 @@ echo "ffmpeg UID: $FFMPEG_UID"
FFPROBE_UID=$(curl -s -X 'GET' "http://localhost:19200/api/variable/name/ffprobe" -H 'accept: application/json' | jq -r '.Uid')
echo "ffprobe UID: $FFPROBE_UID"
-curl -X 'DELETE' \
+curl -s -X 'DELETE' \
"http://localhost:19200/api/variable" \
-H 'accept: */*' \
-H 'Content-Type: application/json' \
@@ -123,7 +123,7 @@ curl -X 'DELETE' \
FFMPEG_PATH=$(which ffmpeg)
FFPROBE_PATH=$(which ffprobe)
-curl -X 'POST' \
+curl -s -X 'POST' \
"http://localhost:19200/api/variable" \
-H 'accept: */*' \
-H 'Content-Type: application/json' \
@@ -132,7 +132,7 @@ curl -X 'POST' \
\"Value\": \"$FFMPEG_PATH\"
}"
-curl -X 'POST' \
+curl -s -X 'POST' \
"http://localhost:19200/api/variable" \
-H 'accept: */*' \
-H 'Content-Type: application/json' \
From 39407080e9df94600cb0f62dc475cfe83e590d0c Mon Sep 17 00:00:00 2001
From: Kyle Kroboth
Date: Wed, 12 Mar 2025 00:01:01 -0400
Subject: [PATCH 16/19] fix: remove debug echos
---
install/fileflows-install.sh | 3 ---
1 file changed, 3 deletions(-)
diff --git a/install/fileflows-install.sh b/install/fileflows-install.sh
index dc501cb..f8f75db 100644
--- a/install/fileflows-install.sh
+++ b/install/fileflows-install.sh
@@ -104,10 +104,7 @@ msg_info "Setting ffmpeg variables in fileflows"
wait_for_api
FFMPEG_UID=$(curl -s -X 'GET' "http://localhost:19200/api/variable/name/ffmpeg" -H 'accept: application/json' | jq -r '.Uid')
-echo "ffmpeg UID: $FFMPEG_UID"
-
FFPROBE_UID=$(curl -s -X 'GET' "http://localhost:19200/api/variable/name/ffprobe" -H 'accept: application/json' | jq -r '.Uid')
-echo "ffprobe UID: $FFPROBE_UID"
curl -s -X 'DELETE' \
"http://localhost:19200/api/variable" \
From c590df969f68d7593320811e0153d48189c56364 Mon Sep 17 00:00:00 2001
From: Kyle Kroboth
Date: Wed, 12 Mar 2025 00:05:28 -0400
Subject: [PATCH 17/19] fix: silent curl
---
install/fileflows-install.sh | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/install/fileflows-install.sh b/install/fileflows-install.sh
index f8f75db..1e524f2 100644
--- a/install/fileflows-install.sh
+++ b/install/fileflows-install.sh
@@ -127,7 +127,7 @@ curl -s -X 'POST' \
-d "{
\"Name\": \"ffmpeg\",
\"Value\": \"$FFMPEG_PATH\"
-}"
+}" 2>/dev/null
curl -s -X 'POST' \
"http://localhost:19200/api/variable" \
@@ -136,7 +136,7 @@ curl -s -X 'POST' \
-d "{
\"Name\": \"ffprobe\",
\"Value\": \"$FFPROBE_PATH\"
-}"
+}" 2>/dev/null
msg_ok "ffmpeg and ffprobe variables have been updated successfully."
From 37df296a9c0cc644f9633425d3e06274df0fdbdb Mon Sep 17 00:00:00 2001
From: Kyle Kroboth
Date: Wed, 12 Mar 2025 00:09:42 -0400
Subject: [PATCH 18/19] fix: silent curl
---
install/fileflows-install.sh | 10 ++--------
1 file changed, 2 insertions(+), 8 deletions(-)
diff --git a/install/fileflows-install.sh b/install/fileflows-install.sh
index 1e524f2..960267f 100644
--- a/install/fileflows-install.sh
+++ b/install/fileflows-install.sh
@@ -124,19 +124,13 @@ curl -s -X 'POST' \
"http://localhost:19200/api/variable" \
-H 'accept: */*' \
-H 'Content-Type: application/json' \
- -d "{
- \"Name\": \"ffmpeg\",
- \"Value\": \"$FFMPEG_PATH\"
-}" 2>/dev/null
+ -d "{\"Name\":\"ffmpeg\",\"Value\":\"$FFMPEG_PATH\"}" /dev/null
curl -s -X 'POST' \
"http://localhost:19200/api/variable" \
-H 'accept: */*' \
-H 'Content-Type: application/json' \
- -d "{
- \"Name\": \"ffprobe\",
- \"Value\": \"$FFPROBE_PATH\"
-}" 2>/dev/null
+ -d "{\"Name\":\"ffprobe\",\"Value\":\"$FFPROBE_PATH\"}" /dev/null
msg_ok "ffmpeg and ffprobe variables have been updated successfully."
From 2a0b6caeacd776ae5e32da889ac26442dd26dac1 Mon Sep 17 00:00:00 2001
From: Kyle Kroboth
Date: Wed, 12 Mar 2025 00:12:20 -0400
Subject: [PATCH 19/19] fix: silent curl
---
install/fileflows-install.sh | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/install/fileflows-install.sh b/install/fileflows-install.sh
index 960267f..ca2d844 100644
--- a/install/fileflows-install.sh
+++ b/install/fileflows-install.sh
@@ -106,7 +106,7 @@ wait_for_api
FFMPEG_UID=$(curl -s -X 'GET' "http://localhost:19200/api/variable/name/ffmpeg" -H 'accept: application/json' | jq -r '.Uid')
FFPROBE_UID=$(curl -s -X 'GET' "http://localhost:19200/api/variable/name/ffprobe" -H 'accept: application/json' | jq -r '.Uid')
-curl -s -X 'DELETE' \
+$STD curl -s -X 'DELETE' \
"http://localhost:19200/api/variable" \
-H 'accept: */*' \
-H 'Content-Type: application/json' \
@@ -120,17 +120,17 @@ curl -s -X 'DELETE' \
FFMPEG_PATH=$(which ffmpeg)
FFPROBE_PATH=$(which ffprobe)
-curl -s -X 'POST' \
+$STD curl -s -X 'POST' \
"http://localhost:19200/api/variable" \
-H 'accept: */*' \
-H 'Content-Type: application/json' \
- -d "{\"Name\":\"ffmpeg\",\"Value\":\"$FFMPEG_PATH\"}" /dev/null
+ -d "{\"Name\":\"ffmpeg\",\"Value\":\"$FFMPEG_PATH\"}"
-curl -s -X 'POST' \
+$STD curl -s -X 'POST' \
"http://localhost:19200/api/variable" \
-H 'accept: */*' \
-H 'Content-Type: application/json' \
- -d "{\"Name\":\"ffprobe\",\"Value\":\"$FFPROBE_PATH\"}" /dev/null
+ -d "{\"Name\":\"ffprobe\",\"Value\":\"$FFPROBE_PATH\"}"
msg_ok "ffmpeg and ffprobe variables have been updated successfully."