small updates

This commit is contained in:
KniveMaker App
2025-03-04 09:01:59 +00:00
parent d799a2e8bd
commit 4c7ebaf5fe
3 changed files with 23 additions and 6 deletions
+3 -2
View File
@@ -90,8 +90,9 @@ main() {
if [[ ! -d "$dir" ]]; then
log_info "Creating directory: $dir"
if mkdir -p "$dir"; then
chmod 775 "$dir"
chown ${TORRENT_USER:-debian-transmission}:${TORRENT_GROUP:-debian-transmission} "$dir"
# Try to set permissions but don't fail if it doesn't work
chmod 775 "$dir" 2>/dev/null || log_warn "Could not set permissions on $dir"
chown ${TORRENT_USER:-debian-transmission}:${TORRENT_GROUP:-debian-transmission} "$dir" 2>/dev/null || log_warn "Could not set ownership on $dir"
log_info "Created directory: $dir"
else
log_error "Failed to create directory: $dir"