Skip to content

Commit

Permalink
make sure vbit2 is stopped before removing services
Browse files Browse the repository at this point in the history
  • Loading branch information
ZXGuesser committed Jan 17, 2023
1 parent 8d62d0a commit ef5726c
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions postupdate.sh
Original file line number Diff line number Diff line change
Expand Up @@ -105,10 +105,13 @@ migrate(){

migratejson(){
if [ -f $HOME/.teletext-services/config ]; then
systemctl --user stop vbit2.service

printf 'This version of VBIT2 uses a new config format and directory scheme.\nServices will not be automatically migrated so must be reinstalled.\nThe following services were found:\n'
ls -d1 ~/.teletext-services/*/

read -n 1 -s -r -p "Do you wish to create a backup of these services? (y/N)"

if [[ $REPLY =~ ^[Yy]$ ]]; then
printf '\nbacking up old services to %s\n' "$HOME/teletext-services.bak"
mv $HOME/.teletext-services $HOME/teletext-services.bak
Expand Down

0 comments on commit ef5726c

Please sign in to comment.