The title may not be much clear. I have written some scripts for housekeeping tasks on the Ubuntu servers we maintain. When ever there is a new deployment for a client, I have to change user ids, passwords and names of the servers etc. to make scripts usable in new setup.
Is there any way which help me to define all these things as variables and use then in all scripts. Like define them in a shell file and then access that file in all other scripts...?
an example backup script:
BACKUPSERVER=192.168.1.123 BACKUPPATH=/home/user1/nightlybackups BACKUPUSER=user1 PASSWORD=user1secret MYSQLUSER=dbuser1 MYSQLPWD=dbuser1secret #..... actual script that uses values above and perform backup etc.
There are quite a few scripts like this that use variables. I want a common place to define them and then access in any script.