[planet-web/oscp] Don't create symlinks if they're there already
- From: Andrea Veri <averi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [planet-web/oscp] Don't create symlinks if they're there already
- Date: Thu, 29 Aug 2019 20:14:51 +0000 (UTC)
commit 43724fe1dcbe04d72607e646df0880f6451d6488
Author: Andrea Veri <averi redhat com>
Date: Thu Aug 29 22:14:52 2019 +0200
Don't create symlinks if they're there already
entrypoint.sh | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
---
diff --git a/entrypoint.sh b/entrypoint.sh
index 0283f96..1e93960 100755
--- a/entrypoint.sh
+++ b/entrypoint.sh
@@ -13,7 +13,11 @@ else
while sleep 3600; do /usr/local/bin/update-pgo-heads; done &
for dir in `ls /planet/web/$PLANET_NAME`; do
- ln -s "/planet/web/${dir}" "/planet/webroot/${dir}"
+ if ! [[ -L "/planet/webroot/${dir}" ]]; then
+ ln -s "/planet/web/${dir}" "/planet/webroot/${dir}"
+ else
+ echo "Symlink for ${dir} is already there!"
+ fi
done
fi
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]