update smarttms.service pure--ftpd.config dcp

This commit is contained in:
zj
2025-12-01 23:54:49 +08:00
parent 1aa297e4df
commit 1c26e23603
8 changed files with 411 additions and 26 deletions

View File

@@ -37,7 +37,7 @@ BrokenClientsCompatibility no
# Maximum number of simultaneous users
MaxClientsNumber 50
MaxClientsNumber 100
@@ -62,7 +62,7 @@ VerboseLog no
# List dot-files even when the client doesn't send "-a".
DisplayDotFiles yes
DisplayDotFiles no
@@ -258,13 +258,13 @@ AllowAnonymousFXP no
# even if they own them. But if TrustedGID is enabled, that group
# will exceptionally have access to dot-files.
ProhibitDotFilesWrite no
ProhibitDotFilesWrite yes
# Prohibit *reading* of files starting with a dot (.history, .ssh...)
ProhibitDotFilesRead no
ProhibitDotFilesRead yes
@@ -449,7 +449,7 @@ CustomerProof yes
# Listen only to IPv4 addresses in standalone mode (ie. disable IPv6)
# By default, both IPv4 and IPv6 are enabled.
# IPV4Only yes
IPV4Only yes

View File

@@ -1 +0,0 @@
/etc/systemd/system/smarttms.service

View File

@@ -1,19 +0,0 @@
[Unit]
Description=SmartTMS Service
After=mysqld.service
Wants=mysqld.service
[Service]
Type=forking
User=root
ExecStart=/usr/bin/smarttms start
ExecStop=/usr/bin/smarttms stop
ExecReload=/bin/kill -HUP $MAINPID
Restart=on-failure
RestartSec=5
TimeoutStartSec=300
TimeoutStopSec=300
[Install]
WantedBy=multi-user.target

View File

@@ -0,0 +1 @@
/home/smart/.config/systemd/user/smarttms.service

View File

@@ -0,0 +1,22 @@
[Unit]
Description=SmartTMS Service (User)
After=mysqld.service graphical.target
Wants=mysqld.service
[Service]
Type=forking
ExecStart=sudo /usr/bin/smarttms start
ExecStop=sudo /usr/bin/smarttms stop
ExecReload=sudo /usr/bin/smarttms restart
Restart=on-failure
RestartSec=5
TimeoutStartSec=300
TimeoutStopSec=300
Environment="DISPLAY=:0"
Environment="XAUTHORITY=/home/smart/.Xauthority"
Environment="XDG_CURRENT_DESKTOP=XFCE"
[Install]
WantedBy=default.target

View File

@@ -0,0 +1,68 @@
#!/bin/bash
# ==============================================================================
# FFmpeg Wrapper Script for Volume Detection
#
# This script acts as a wrapper for the real ffmpeg binary.
# It's designed to handle cases where 'ffmpeg -filter:a volumedetect'
# doesn't output 'mean_volume:' (e.g., for image files or videos without audio).
#
# If 'mean_volume:' is not found in the real ffmpeg's stderr output,
# it injects 'mean_volume: 0 dB' into the stderr stream.
#
# Setup:
# 1. Rename your original ffmpeg binary.
# Example: mv /usr/bin/ffmpeg /usr/bin/ffmpeg.bin
# 2. Place this script at the original ffmpeg's path.
# Example: cp this_script.sh /usr/bin/ffmpeg
# 3. Make this script executable.
# Example: chmod +x /usr/bin/ffmpeg
# 4. Ensure REAL_FFMPEG_BINARY points to your renamed ffmpeg binary.
# ==============================================================================
# --- Configuration ---
# Point this to the actual ffmpeg binary after you've renamed it.
# For example: /usr/bin/ffmpeg.bin or /usr/local/bin/ffmpeg.bin
REAL_FFMPEG_BINARY="/usr/bin/ffmpeg.bin"
# ---------------------
# Check if the real ffmpeg binary exists
if [ ! -f "$REAL_FFMPEG_BINARY" ]; then
echo "Error: Real ffmpeg binary not found at $REAL_FFMPEG_BINARY" >&2
echo "Please ensure you've renamed your original ffmpeg (e.g., to ffmpeg.bin)" >&2
echo "and updated the REAL_FFMPEG_BINARY path in this script." >&2
exit 1
fi
# Create a temporary file to capture stderr from the real ffmpeg command
TEMP_ERR_FILE=$(mktemp)
# Ensure the temporary file is deleted when the script exits
trap "rm -f $TEMP_ERR_FILE" EXIT
# Execute the real ffmpeg with all arguments passed to this script.
# Redirect its stdout to /dev/null as volumedetect output is on stderr.
# Redirect its stderr to our temporary file.
"$REAL_FFMPEG_BINARY" "$@" >/dev/null 2>"$TEMP_ERR_FILE"
# Capture the exit code of the real ffmpeg command
REAL_FFMPEG_EXIT_CODE=$?
# Read the content of the temporary stderr file
FFMPEG_STDERR_CONTENT=$(cat "$TEMP_ERR_FILE")
# Check if "mean_volume:" is present in the captured stderr content
if echo "$FFMPEG_STDERR_CONTENT" | grep -q "mean_volume:"; then
# If found, print the original stderr content to our stderr
echo "$FFMPEG_STDERR_CONTENT" >&2
else
# If not found, print the original stderr content
echo "$FFMPEG_STDERR_CONTENT" >&2
# Then inject the default mean_volume line
echo "[ffmpeg-wrapper] Injected: mean_volume: 0 dB (original output lacked volume info)" >&2 # For debugging
echo "mean_volume: 0 dB" >&2
fi
# Exit with the same exit code as the real ffmpeg command
exit $REAL_FFMPEG_EXIT_CODE

View File

@@ -5,7 +5,7 @@ iso_name="BBTTMS"
iso_label="BBTTMS_$(date --date="@${SOURCE_DATE_EPOCH:-$(date +%s)}" +%Y%m)"
iso_publisher="BBTTMS <https://yuyujing.cn>"
iso_application="BBTTMS Arch Linux Live/Rescue/Install DVD"
iso_version="$(date --date="@${SOURCE_DATE_EPOCH:-$(date +%s)}" +%Y.%m.%d)"
iso_version="BBTTMS_$(date --date="@${SOURCE_DATE_EPOCH:-$(date +%s)}" +%Y.%m.%d)"
install_dir="BBTTMS"
buildmodes=('iso')
bootmodes=('bios.syslinux.mbr' 'bios.syslinux.eltorito'