Add delay option in services.
This commit is contained in:
parent
7c376c8a5d
commit
4d45ab4858
@ -37,8 +37,16 @@ case $1 in
|
|||||||
mkdir -p $CHROOT/$i
|
mkdir -p $CHROOT/$i
|
||||||
rbind $i
|
rbind $i
|
||||||
done
|
done
|
||||||
|
msg "Starting services"
|
||||||
for j in ${SERVICES[@]}; do
|
for j in ${SERVICES[@]}; do
|
||||||
chroot $CHROOT /bin/su -c "/usr/local/bin/archboxctl exec $j" > /dev/null 2>&1
|
if [[ $j = *:* ]]; then
|
||||||
|
delay=$(echo $j | sed 's/.*://')
|
||||||
|
service=$(echo $j | sed 's/:.*//')
|
||||||
|
chroot $CHROOT /bin/su -c "/usr/local/bin/archboxctl exec $service" > /dev/null 2>&1 &
|
||||||
|
sleep $delay
|
||||||
|
else
|
||||||
|
chroot $CHROOT /bin/su -c "/usr/local/bin/archboxctl exec $j" > /dev/null 2>&1 &
|
||||||
|
fi
|
||||||
done
|
done
|
||||||
exit 0
|
exit 0
|
||||||
;;
|
;;
|
||||||
|
Loading…
Reference in New Issue
Block a user