Hi,
I want to use a series of terminal commands, first to open the terminal ( if needed ), change the user ( log in as another user ), enter in a folder and execute a command to start a SQL server and then log out and close the terminal window ( if needed, maybe I can do it without opening it ).
After that I want to do the same to stop the server, but following the logic is the same script just changing the start to stop.
# Manually Start PostgreSQL
## su as user "postgres" and run server:
su postgres
# type the password ( if possible do it automatically )
cd /Library/PostgreSQL/9.0/bin/
./pg_ctl -D /Library/PostgreSQL/9.0/data/ start
# then logout
exit
# close the terminal window
Anyway thanks for the attention !