Rather than duplicate the info, I have posted a new thread on cruisers forum regarding an issue with opencpn.conf file getting corrupted.
So far, the issue doesn't seem to be addressed by the OpenCPN team ...
The walk around I mention makes use of 2 bash scrips, one to create a backup of opencpn.conf, to be run when everything is going nicely, and the second one to restore the opencpn.conf when the catastrophe happened !
Not so elegant, but please consider these are my very first bash scripts !
here they are :
Backup :
# this script backs up the opencpn.conf file in the
# directory : ~/Sauvegardes
#OpenCPNshould be stooped 1st (CTRL+Q) and
# the content of opencpn.conf checked non empty)
cp /home/pi/.opencpn/opencpn.conf /home/pi/Sauvegardes/opencpn.conf
Restore :
# this script replaces the file /.opencpn/opencpn.conf,
# when corrpted with he file formerly saved in the directory : ~/Sauvegardes
# Save the corrupted file, target of the pocedure, for forensic analysis :
cp /home/pi/.opencpn/opencpn.conf /home/pi/.opencpn/garbage.ocpn.txt
# delete the corrupted file :
rm -f /home/pi/.opencpn/opencpn.conf
# replace the corrupted file by its backup :
cp /home/pi/Sauvegardes/opencpn.conf /home/pi/.opencpn/opencpn.conf
Edit : see improved script later in this thread
Being a complete newbie in the art of bash/Linux, I am sure these scripts can be condensed, and then improved, maybe merged in a single script which would run automaticaly at startup ?
I am opened to any suggestion to automate the process as much as possible !
So far, the issue doesn't seem to be addressed by the OpenCPN team ...
The walk around I mention makes use of 2 bash scrips, one to create a backup of opencpn.conf, to be run when everything is going nicely, and the second one to restore the opencpn.conf when the catastrophe happened !
Not so elegant, but please consider these are my very first bash scripts !
here they are :
Backup :
# this script backs up the opencpn.conf file in the
# directory : ~/Sauvegardes
#OpenCPNshould be stooped 1st (CTRL+Q) and
# the content of opencpn.conf checked non empty)
cp /home/pi/.opencpn/opencpn.conf /home/pi/Sauvegardes/opencpn.conf
Restore :
# this script replaces the file /.opencpn/opencpn.conf,
# when corrpted with he file formerly saved in the directory : ~/Sauvegardes
# Save the corrupted file, target of the pocedure, for forensic analysis :
cp /home/pi/.opencpn/opencpn.conf /home/pi/.opencpn/garbage.ocpn.txt
# delete the corrupted file :
rm -f /home/pi/.opencpn/opencpn.conf
# replace the corrupted file by its backup :
cp /home/pi/Sauvegardes/opencpn.conf /home/pi/.opencpn/opencpn.conf
Edit : see improved script later in this thread
Being a complete newbie in the art of bash/Linux, I am sure these scripts can be condensed, and then improved, maybe merged in a single script which would run automaticaly at startup ?
I am opened to any suggestion to automate the process as much as possible !
Cordialement
Didier B
Pi4, SSD USB3, OP 3.0 Touch SK 3.2.1 OpenCPN 5.8.4 : Thank you Thank you Thank you
Didier B
Pi4, SSD USB3, OP 3.0 Touch SK 3.2.1 OpenCPN 5.8.4 : Thank you Thank you Thank you