From 83e7f5c933280754a61a8a3fdaf6e13ab74f3fdd Mon Sep 17 00:00:00 2001 From: zeus Date: Mon, 21 Feb 2022 16:09:34 +0200 Subject: [PATCH] add rcloca --- install/usr/share/swarmlab.io/sec/sec_bootstrap | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/install/usr/share/swarmlab.io/sec/sec_bootstrap b/install/usr/share/swarmlab.io/sec/sec_bootstrap index 44ef876..fe04016 100755 --- a/install/usr/share/swarmlab.io/sec/sec_bootstrap +++ b/install/usr/share/swarmlab.io/sec/sec_bootstrap @@ -46,7 +46,20 @@ case $ROLE in # Auto update default host file in background and dumb all output auto_update_hosts "${HOSTNAMES}" > /dev/null 2>&1 & - ttyd -p 3787 bash + ttyd -p 3787 bash & + +extrarclocal=/tmp/bin/rclocal +if [ -f $extrarclocal ]; then + if [ -s $extrarclocal ]; then + # The file is not-empty. + sh /tmp/bin/rclocal 2>&1 | tee /tmp/logs/rclocal.log + else + # The file is empty. + echo "file empty" + fi +fi + + tail -f /dev/null # Start ssh server