If in my automation script, I need to do something like install oh-my-zsh, I will have a .sh script like this:
#!/bin/sh runuser -l user -c 'sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"'
This works and will install oh-my-zsh as I expect but it then puts the session into a zsh shell. If I add the command
exit to the end of the script, it does nothing.
How can I either disallow switching to zsh (Or any other shell) or exit from it in my script?