Unix Bash Script
I have been assigned my colleague's task to write a bash script which would copy the contents from one Debian 10 server [Non Production] to another Debian 10 server [Production].
The request that has been shared is :
PART A
#!/bin/bash
#SYSTEM_VARIABLES
INSTALLATION_DIR=/var/www/kapp
GIT_DIR=
SSL_CERT=
SSL_KEY=
NGINX_CONF=/etc/nignx/sites-available/kapp.zimpa.com
In reference to the above, the variables being declared, please do let me know how I would get the following data from Debian 10 server [Non Production]
GIT_DIR=
SSL_CERT=
SSL_KEY=
PART B
installPHPComposer
installLaravel
cloneGitFirstTome
pullFromGit
checkInstallationDir
if [ -e $INSTALLATION_DIR ]; then
fi
case "$1" in
first-install)
installPHPComposer
installPHPComposer
installPHPComposer
installPHPComposer
;;
update_from_git)
stop
;;
status)
status anacron
;;
restart)
stop
start
;;
condrestart)
if test "x`pidof anacron`" != x; then
stop
start
fi
;;
*)
echo $"Usage: $0 {first-install|update-from-git}"
exit 1
In the above PART B, the installation directory has to be reviewed. Then, within a case construct, need to: 1) Install PHP Composer 2) Install Laravel 3) Clone the GIT 4) Create a Pull Request from GIT.