mirror of
https://github.com/billz/raspap-webgui.git
synced 2025-07-07 20:27:41 +02:00
Update plugin_helper.sh
This commit is contained in:
parent
605486feda
commit
71f1132bc8
@ -71,15 +71,9 @@ case "$action" in
|
||||
exit 1
|
||||
fi
|
||||
|
||||
dest_dir="$(dirname "$destination")"
|
||||
if [ -z "$dest_dir" ] || [ "$dest_dir" = "/" ]; then
|
||||
echo "Error: Unsafe destination path."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
mkdir -p "$dest_dir"
|
||||
chown -R "$raspap_user:$raspap_user" "$dest_dir"
|
||||
mkdir -p "$(dirname "$destination")"
|
||||
cp "$source" "$destination"
|
||||
chown -R $raspap_user:$raspap_user "$destination"
|
||||
|
||||
echo "OK"
|
||||
;;
|
||||
|
Loading…
x
Reference in New Issue
Block a user