File tree 2 files changed +13
-13
lines changed
2 files changed +13
-13
lines changed Original file line number Diff line number Diff line change @@ -3,19 +3,6 @@ DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
3
3
DATE=$( date +%Y-%m-%d:%H:%M:%S)
4
4
totalm=$( free -m | awk ' /^Mem:/{print $2}' )
5
5
6
- GH_ACTIONS_TRIGGER=$1
7
- if ! [[ " $GH_ACTIONS_TRIGGER " = ' gh' ]]; then
8
- if [[ " $DIR " = ' /root' * ]]; then
9
- echo " You cannot install Countly under /root. Suggested paths: /opt or /usr."
10
- exit 1
11
- elif [[ " $DIR " = ' /home' * ]]; then
12
- if ! [[ " $DIR " = ' /home/countly' * ]]; then
13
- echo " You cannot install Countly under home directory of any other user. Suggested paths: /opt or /usr."
14
- exit 1
15
- fi
16
- fi
17
- fi
18
-
19
6
if [ " $INSIDE_DOCKER " == " 1" ]; then
20
7
if [ -f /etc/lsb-release ]; then
21
8
apt install sudo -y
@@ -25,6 +12,16 @@ if [ "$INSIDE_DOCKER" == "1" ]; then
25
12
fi
26
13
27
14
sudo bash " $DIR /scripts/init_countly_user.sh"
15
+ cd " $DIR /../"
16
+ sudo su countly -c " /bin/bash $DIR /scripts/check_countly_user_permissions.sh > /dev/null 2>&1"
17
+
18
+ if [ ! -f ./permission_test_file.txt ]; then
19
+ PARENT_DIR=$( cd ./../ && pwd)
20
+ echo " Permission error, you cannot install Countly under ${PARENT_DIR} ."
21
+ else
22
+ rm -f ./permission_test_file.txt
23
+ fi
24
+
28
25
29
26
if [ " $totalm " -lt " 1800" ]; then
30
27
echo " Countly requires at least 2Gb of RAM"
Original file line number Diff line number Diff line change
1
+ #! /bin/bash
2
+
3
+ touch permission_test_file.txt
You can’t perform that action at this time.
0 commit comments