First off, I only just started learning how to use Linux yesterday so my abilities are very limited.
I am essentially creating a script that I can run everytime I turn on my VPS and the script then turns on all the servers. However due to my lack of knowledge I have ran into some difficulties as once the script gets to turning the servers on it doesn't change the directories, leaving it as the default directory.
I am not sure if I am doing it right at all, so if you find a mistake in the script it would be great if you could correct me - or if you have a more efficient way of doing something.
#!/bin/bash
service mysqld start
sudo service httpd restart
sudo service vsftpd restart
echo finished initialization
cd ~/server_1 & dos2unix start.sh & sh start.sh &
cd ~/server_2 & dos2unix start.sh & sh start.sh &
cd ~/bungee_1 & dos2unix start.sh & sh start.sh &&
fg
echo finished
cd ~/server_1 &?