setenv 1.2 KB
Newer Older
TonyFord's avatar
TonyFord committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
#!/bin/bash

export RUNNER_UID=`id -u`
export RUNNER_GID=`id -g`

CI_PROJECT_NAME=${PWD##*/}

F=`ls -p ./env | grep -v /`
for f in $F
do
    v=`echo -n ${!f}`
    if [ "${!f}" != "" ]
    then
      echo "${f}=${!f}" > ./env/${f}
    fi
done

if [[ -d "./env_file" ]]
then
  F=`ls -p ./env_file | grep -v /`
  for f in $F
  do
     echo ${f}=./env_file/${f} > ./env/${f}
  done
fi

# link to gitlab-runner env files if exists ####
if [[ -d "../${CI_PROJECT_NAME}.tmp" ]]
then
  F=`ls -p ../${CI_PROJECT_NAME}.tmp | grep -v /`
  for f in $F
  do
     echo ${f}=${PWD}/../${CI_PROJECT_NAME}.tmp/${f} > ./env/${f}
  done
fi

# export env vars
export `cat ./env/*`

# set executable to console and deployment commands
chmod +x console/electrumfairchainsx
chmod +x console/electrumx
chmod +x console/faircoin
chmod +x console/php-server
chmod +x console/help
chmod +x console/status
chmod +x console/ps

chmod +x console/create_wallet
chmod +x console/restore_wallet
chmod +x console/load_wallet
chmod +x console/close_wallet
chmod +x console/walletinfo

chmod +x deploy/help
chmod +x deploy/build
chmod +x deploy/start
chmod +x deploy/new_ssl
chmod +x deploy/stop
chmod +x deploy/install
chmod +x deploy/uninstall
chmod +x deploy/remove