Skip to content

Commit

Permalink
Support for uninstall
Browse files Browse the repository at this point in the history
  • Loading branch information
fsantini committed Dec 21, 2018
1 parent 2b93a6d commit cd11ae1
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
KoboRoot.tgz
kobocloudrc
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@ To add a Dropbox link, open your dropbox in a browser. Select the folder that yo
## Usage
The new files will be downloaded when the kobo connects to the Internet for a sync.

## Uninstallation
To properly uninstall KoboCloud, edit the kobocloudrc file so that it contains the word `UNINSTALL` in a single line (all capital, no spaces before or after). Restart your Kobo. The next time the Kobo is connected to the Internet, the program will delete itself.
The directory .kobo/kobocloud will not be deleted: after connecting the ereader to a computer, you should move the files from the Library subfolder in order not to lose your content, and delete the whole kobocloud directory manually.

## Troubleshooting
KoboCloud keeps a log of each session in the .kobo/kobocloud/get.log file. If something goes wrong, useful information can be found there. Please send a copy of this file with every bug report.

Expand Down
7 changes: 7 additions & 0 deletions src/usr/local/kobocloud/get.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,13 @@
#load config
. `dirname $0`/config.sh

#check if Kobocloud contains the line "UNINSTALL"
if grep -q '^UNINSTALL$' $UserConfig; then
echo "Uninstalling KoboCloud!"
`dirname $0`/uninstall.sh
exit 0
fi

#check internet connection
echo "`$Dt` waiting for internet connection"
r=1;i=0
Expand Down
2 changes: 2 additions & 0 deletions src/usr/local/kobocloud/udev_mount.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@

if [ ! -e $UserConfig ]; then
echo "# Add your URLs to this file" > $UserConfig
echo "# Remove the # from the following line to uninstall KoboCloud" >> $UserConfig
echo "#UNINSTALL" >> $UserConfig
fi

#bind mount to subfolder of SD card on reboot
Expand Down
6 changes: 6 additions & 0 deletions src/usr/local/kobocloud/uninstall.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/bin/sh

# Uninstall kobocloud

rm -f /etc/udev/rules.d/97-kobocloud.rules
rm -rf /usr/local/kobocloud/

0 comments on commit cd11ae1

Please sign in to comment.