I have created a bash script which will store some data into a mysql database. Then I have created deb
file with that script and made it available for installation by creating local apt repository.
Now, I can install that package in any system(apt-get install packgename
), but the problem is, I have to manually create the mysql database for that script after each installation on each system.
Is there any way so that I can run a script for creating mysql database(as it is a one time requirement for a system) during the installation itself. I have heard something like post
and pre
scripts but not getting any idea on googling. Could you guys give some good tutorials for that ?