Skip to content

Commit 9c74bcc

Browse files
committed
Remove unncessary user check and allow script to be run only by root
1 parent ccb7e89 commit 9c74bcc

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

bin/v-open-fs-config

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@ if [ -z "$src_file" ]; then
1212
exit 1
1313
fi
1414

15-
# Checking hestia user
16-
if [ ! -d "$HESTIA/data/users/$user" ]; then
17-
echo "Error: hestia user $user doesn't exist"
18-
exit 3
15+
# Checking root permissions
16+
if [ "$(id -u)" != '0' ]; then
17+
echo "Error: Script can be run executed only by root"
18+
exit 10
1919
fi
2020

2121
# Checking file on fs

0 commit comments

Comments
 (0)