mirror of
https://github.com/billz/raspap-webgui.git
synced 2025-07-07 23:07:39 +02:00
Update plugin_helper.sh
This commit is contained in:
parent
605486feda
commit
71f1132bc8
@ -71,15 +71,9 @@ case "$action" in
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
dest_dir="$(dirname "$destination")"
|
mkdir -p "$(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"
|
|
||||||
cp "$source" "$destination"
|
cp "$source" "$destination"
|
||||||
|
chown -R $raspap_user:$raspap_user "$destination"
|
||||||
|
|
||||||
echo "OK"
|
echo "OK"
|
||||||
;;
|
;;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user