Browse Source

Make the script idempotent

migrate-pregen
nicolas.dorier 7 years ago
parent
commit
7a8ef8cab5
  1. 13
      btcpay-setup.sh

13
btcpay-setup.sh

@ -249,5 +249,14 @@ end script" > /etc/init/start_containers.conf
fi
find "$ORIGINAL_DIRECTORY" -name "*.sh" -exec chmod +x {} \;
find "$ORIGINAL_DIRECTORY" -name "*.sh" -exec ln -s {} /usr/bin \;
cd $ORIGINAL_DIRECTORY
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

Loading…
Cancel
Save