سؤال
Im trying to write a bash script that executes several commands as different users to automate an install process.
At one point I have
su gpadmin
gpperfmon_install --enable --password password --port 5432
y
gpstar
y
The su gpadmin is run as root, and once it is run the script stops until I exit gpadmin and return as root.
How would one switch to a new user without halting the script?
Sorry for my ignorance, I attempted to google but found nothing that worked. Any help would be greatly appreciated.
لا يوجد حل صحيح
لا تنتمي إلى StackOverflow