Skip to content

Commit 1d11d34

Browse files
committed
scripts
1 parent adce67b commit 1d11d34

File tree

7 files changed

+35
-12
lines changed

7 files changed

+35
-12
lines changed

run/acme.sh

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
# `acme/acme.json` file for storing https certificates
12
DIR=acme
23
FILE=acme/acme.json
34

@@ -7,5 +8,6 @@ fi
78

89
if [ ! -f "$FILE" ]; then
910
touch "$FILE"
10-
chmod 600 "$FILE"
11-
fi
11+
fi
12+
13+
chmod 600 "$FILE"

run/build.sh

Lines changed: 0 additions & 7 deletions
This file was deleted.

run/data.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# `data/` folder for storing DB, Redis, etc. data
2+
DIR=data
3+
4+
if [ ! -d "$DIR" ]; then
5+
mkdir data
6+
fi

run/get-repo.sh

Lines changed: 0 additions & 2 deletions
This file was deleted.

run/services/postgresql.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# -- creating folder for PostgreSQL
2+
DIR=data/postgresql
3+
4+
if [ ! -d "$DIR" ]; then
5+
mkdir data/postgresql
6+
fi

run/services/redis.sh

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# -- creating folder for Redis
2+
DIR=data/redis
3+
4+
if [ ! -d "$DIR" ]; then
5+
mkdir data/redis
6+
fi
7+
8+
sudo chown -R 1001:1001 data/redis

run/setup.sh

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,11 @@
1-
bash run/acme.sh
1+
# -- running system bash files
2+
bash run/acme.sh
3+
bash run/data.sh
4+
5+
# -- running services' bash files
6+
BASH_FILES=""
7+
for F in `find ./run/services -type f -maxdepth 1 -name "*.sh"`
8+
do
9+
BASH_FILES="$BASH_FILES bash $F;"
10+
done
11+
eval $BASH_FILES

0 commit comments

Comments
 (0)