Install script

Forum rules
Before you post please read how to get help
Post Reply
Wazzking
Level 1
Level 1
Posts: 2
Joined: Sun Oct 18, 2020 11:45 am

Install script

Post by Wazzking »

Looking at writing a bash script to update an application folder and process.

Couple of things.

I was thinking of update via symlink ie adding new binaries and pointing symlink to new folder instead of replacing existing? Good practice?
Anyone have an example of such a script to fetch stop download repoint and start - log ? Anything i've missed in those steps appreciated

TIA
User avatar
Kadaitcha Man
Level 10
Level 10
Posts: 3322
Joined: Mon Aug 27, 2012 10:17 pm

Re: Install script

Post by Kadaitcha Man »

Wazzking wrote:
Sun Oct 18, 2020 11:51 am
I was thinking of update via symlink ie adding new binaries and pointing symlink to new folder instead of replacing existing? Good practice?
Anyone have an example of such a script to fetch stop download repoint and start - log ? Anything i've missed in those steps appreciated
What on earth are you talking about?
It's pronounced kad-eye-cha, not kada-itcha.
Wazzking
Level 1
Level 1
Posts: 2
Joined: Sun Oct 18, 2020 11:45 am

Re: Install script

Post by Wazzking »

Kadaitcha Man wrote:
Sun Oct 18, 2020 5:41 pm

What on earth are you talking about?

Don't tell me you're wearing jeans t-shirt maybe check shirt with hair too long for your age. Loves heavy metal and abstract bands Star Wars and any other trilogy. Do you only converse in C#? :D

Anyway lets start again hello Kadaitcha Man

Im looking at a self-updating script. MY first steps are to define what i want it to do.


Check for new version if none exit
stop service/daemon
Backup old versionof working directory
wget new binaries to parallel directory location give naming format
copy into existing folder for service/daemon to keep paths same.
start service/daemon

My mention of simlink is i've seen some places for example java is simlinked to latest version binaries so as new ver is added simlinked java just points to the newer directory and of course easy to rollback to older. Is that good practice or a better way?

Your thoughts or anyone elses welcome. Many thanks.
Post Reply

Return to “Scripts & Bash”