function create-container() {
containerName=$1;
+ if [ "$containerName"="alpine-edge" ] || [ "$containerName"="openwrt" ]; then
+ containerShell="/bin/sh";
+ else
+ containerShell="/bin/bash";
+ fi
if grep -q $containerName $DATABASE; then
containerImagePath=$(grep $containerName $DATABASE | cut -d ";" -f 1);
startupScript=$(grep $containerName $DATABASE | cut -d ";" -f 4);
sec=$((sec + 1));
done
/usr/bin/lxc file push ${HOME}/idle/$startupScript ${containerName}/root/${startupScript}
- /usr/bin/lxc exec $containerName /bin/bash /root/${startupScript}
+ /usr/bin/lxc exec $containerName $conatinerShell /root/${startupScript}
echo "Container is ready for work.";
else
echo "Given container name doesn't exist in project database";