Make the script idempotent
This commit is contained in:
@@ -249,5 +249,14 @@ end script" > /etc/init/start_containers.conf
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
find "$ORIGINAL_DIRECTORY" -name "*.sh" -exec chmod +x {} \;
|
cd $ORIGINAL_DIRECTORY
|
||||||
find "$ORIGINAL_DIRECTORY" -name "*.sh" -exec ln -s {} /usr/bin \;
|
|
||||||
|
for scriptname in *.sh; do
|
||||||
|
echo $scriptname
|
||||||
|
chmod +x $scriptname
|
||||||
|
if [ -e /usr/bin/$scriptname ]; then
|
||||||
|
rm /usr/bin/$scriptname
|
||||||
|
fi
|
||||||
|
ln -s $scriptname /usr/bin
|
||||||
|
done
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user