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
Install script
Forum rules
Before you post please read how to get help
Before you post please read how to get help
- Kadaitcha Man
- Level 11
- Posts: 3651
- Joined: Mon Aug 27, 2012 10:17 pm
Re: Install script
What on earth are you talking about?Wazzking wrote: ↑Sun Oct 18, 2020 11:51 amI 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
It's pronounced kad-eye-cha, not kada-itcha.
Re: Install script
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#?

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.
Re: Install script
If you can be explicit in what you're wanting, I could literally write something for you, or better guide you in the right direction.
Starting a service is done with systemctl(1). Backing up can be done with something like tar(1) with gzip(1) compression. Downloading can be done with wget(1) or curl(1), but you seem aware of that already. Check out the man(1) pages (hence the parentheses).
From you recent post here on this thread, it seems like you have a service or daemon which needs to be stopped, have some maintenance stuff done to it, then started back up again.
Starting a service is done with systemctl(1). Backing up can be done with something like tar(1) with gzip(1) compression. Downloading can be done with wget(1) or curl(1), but you seem aware of that already. Check out the man(1) pages (hence the parentheses).
From you recent post here on this thread, it seems like you have a service or daemon which needs to be stopped, have some maintenance stuff done to it, then started back up again.
I use Linux Mint 18.3 with Cinnamon in a VirtualBox VM for testing & sandboxing.
I'm LearnLinux (LL) on YouTube: https://www.youtube.com/c/learnlinux
I'm also terminalforlife (TFL) on GitHub: https://github.com/terminalforlife
I'm LearnLinux (LL) on YouTube: https://www.youtube.com/c/learnlinux
I'm also terminalforlife (TFL) on GitHub: https://github.com/terminalforlife