Skip to content

Commit 58c4972

Browse files
committed
chore(base): add env dir and exec dir
1 parent b207824 commit 58c4972

1 file changed

Lines changed: 27 additions & 2 deletions

File tree

debootstrap/bullseye/rootfs/usr/bin/init-stack

Lines changed: 27 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,36 @@
11
#!/bin/bash
2-
profiles=$(find /opt/drycc/*/profile.d/* 2>/dev/null)
3-
for profile in ${profiles}
2+
3+
env_list=$(find /opt/drycc/*/env/* 2>/dev/null)
4+
for env in ${env_list}
5+
do
6+
key=$(echo "${env}" | awk -F "/" '{print $NF}')
7+
value=$(<"${env}")
8+
# shellcheck source=/dev/null
9+
export "${key}=${value}"
10+
done
11+
12+
env_launch_list=$(find /opt/drycc/*/env.launch/* 2>/dev/null)
13+
for env in ${env_launch_list}
14+
do
15+
key=$(echo "${env}" | awk -F "/" '{print $NF}')
16+
value=$(<"${env}")
17+
# shellcheck source=/dev/null
18+
export "${key}=${value}"
19+
done
20+
21+
profile_list=$(find /opt/drycc/*/profile.d/* 2>/dev/null)
22+
for profile in ${profile_list}
423
do
524
# shellcheck source=/dev/null
625
. "${profile}"
726
done
827

28+
exec_list=$(find /opt/drycc/*/exec.d/* 2>/dev/null)
29+
for _exec in ${exec_list}
30+
do
31+
"${_exec}"
32+
done
33+
934
if [[ "$$" == "1" ]] ; then
1035
exec tini -g -- "$@"
1136
else

0 commit comments

Comments
 (0)