Skip to content

Commit 7cac878

Browse files
committed
Fileflows test
1 parent 7d5123b commit 7cac878

2 files changed

Lines changed: 121 additions & 0 deletions

File tree

ct/fileflows.sh

Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
#!/usr/bin/env bash
2+
source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/misc/build.func)
3+
# Copyright (c) 2021-2026 community-scripts ORG
4+
# Author: kkroboth
5+
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
6+
# Source: https://fileflows.com/
7+
8+
APP="FileFlows"
9+
var_tags="${var_tags:-media;automation}"
10+
var_cpu="${var_cpu:-2}"
11+
var_ram="${var_ram:-2048}"
12+
var_disk="${var_disk:-8}"
13+
var_os="${var_os:-debian}"
14+
var_version="${var_version:-13}"
15+
var_unprivileged="${var_unprivileged:-1}"
16+
var_gpu="${var_gpu:-yes}"
17+
18+
header_info "$APP"
19+
variables
20+
color
21+
catch_errors
22+
23+
function update_script() {
24+
header_info
25+
check_container_storage
26+
check_container_resources
27+
28+
if [[ ! -d /opt/fileflows ]]; then
29+
msg_error "No ${APP} Installation Found!"
30+
exit
31+
fi
32+
if ! [[ $(dpkg -s jq 2>/dev/null) ]]; then
33+
$STD apt-get update
34+
$STD apt-get install -y jq
35+
fi
36+
37+
update_available=$(curl -fsSL -X 'GET' "http://localhost:19200/api/status/update-available" -H 'accept: application/json' | jq .UpdateAvailable)
38+
if [[ "${update_available}" == "true" ]]; then
39+
msg_info "Stopping Service"
40+
systemctl stop fileflows
41+
msg_info "Stopped Service"
42+
43+
msg_info "Creating Backup"
44+
backup_filename="/opt/${APP}_backup_$(date +%F).tar.gz"
45+
tar -czf "$backup_filename" -C /opt/fileflows Data
46+
msg_ok "Backup Created"
47+
48+
msg_info "Updating $APP to latest version"
49+
temp_file=$(mktemp)
50+
curl -fsSL https://fileflows.com/downloads/zip -o "$temp_file"
51+
$STD unzip -o -d /opt/fileflows "$temp_file"
52+
rm -rf "$temp_file"
53+
rm -rf "$backup_filename"
54+
msg_ok "Updated $APP to latest version"
55+
56+
msg_info "Starting Service"
57+
systemctl start fileflows
58+
msg_ok "Started Service"
59+
msg_ok "Updated successfully!"
60+
else
61+
msg_ok "No update required. ${APP} is already at latest version"
62+
fi
63+
64+
exit
65+
}
66+
67+
start
68+
build_container
69+
description
70+
71+
msg_ok "Completed successfully!\n"
72+
echo -e "${CREATING}${GN}${APP} setup has been successfully initialized!${CL}"
73+
echo -e "${INFO}${YW} Access it using the following URL:${CL}"
74+
echo -e "${TAB}${GATEWAY}${BGN}http://${IP}:19200${CL}"

install/fileflows-install.sh

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
#!/usr/bin/env bash
2+
3+
# Copyright (c) 2021-2026 community-scripts ORG
4+
# Author: kkroboth
5+
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
6+
# Source: https://fileflows.com/
7+
8+
# Import Functions und Setup
9+
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
10+
color
11+
verb_ip6
12+
catch_errors
13+
setting_up_container
14+
network_check
15+
update_os
16+
17+
msg_info "Installing Dependencies"
18+
$STD apt-get install -y \
19+
ffmpeg \
20+
jq \
21+
imagemagick
22+
msg_ok "Installed Dependencies"
23+
24+
setup_hwaccel
25+
26+
msg_info "Installing ASP.NET Core Runtime"
27+
curl -fsSL https://packages.microsoft.com/config/debian/12/packages-microsoft-prod.deb -o packages-microsoft-prod.deb
28+
$STD dpkg -i packages-microsoft-prod.deb
29+
rm -rf packages-microsoft-prod.deb
30+
$STD apt-get update
31+
$STD apt-get install -y aspnetcore-runtime-8.0
32+
msg_ok "Installed ASP.NET Core Runtime"
33+
34+
msg_info "Setup ${APPLICATION}"
35+
$STD ln -svf /usr/bin/ffmpeg /usr/local/bin/ffmpeg
36+
$STD ln -svf /usr/bin/ffprobe /usr/local/bin/ffprobe
37+
temp_file=$(mktemp)
38+
curl -fsSL https://fileflows.com/downloads/zip -o "$temp_file"
39+
$STD unzip -d /opt/fileflows "$temp_file"
40+
(cd /opt/fileflows/Server && dotnet FileFlows.Server.dll --systemd install --root true)
41+
systemctl enable -q --now fileflows
42+
rm -f "$temp_file"
43+
msg_ok "Setup ${APPLICATION}"
44+
45+
motd_ssh
46+
customize
47+
cleanup_lxc

0 commit comments

Comments
 (0)