View Single Post
Old 11-04-2013, 04:20 PM   #11
aleyx
Addict
aleyx can self-interpret dreams as they happen.aleyx can self-interpret dreams as they happen.aleyx can self-interpret dreams as they happen.aleyx can self-interpret dreams as they happen.aleyx can self-interpret dreams as they happen.aleyx can self-interpret dreams as they happen.aleyx can self-interpret dreams as they happen.aleyx can self-interpret dreams as they happen.aleyx can self-interpret dreams as they happen.aleyx can self-interpret dreams as they happen.aleyx can self-interpret dreams as they happen.
 
Posts: 250
Karma: 20386
Join Date: Sep 2010
Location: France
Device: Bookeen Diva, Kobo Clara BW
Quote:
Originally Posted by eschwartz View Post
Looks awesome, though really, it is usually updated every Friday. This would only be useful on the odd week that it doesn't get updated. Still, it's cool so I'm gonna use it. Thanks!!!
You're welcome.

Don't forget to customize calibre-update.sh for your particular needs.

For exemple, backup before update:
Code:
#!/bin/bash
if python calibre-check.py; then
        . backup-library.sh
        sudo python -c "import sys; py3 = sys.version_info[0] > 2; u = __import__('urllib.request' if py3 else 'urllib', fromlist=1); exec(u.urlopen('http://status.calibre-ebook.com/linux_installer').read()); main(install_dir='/opt')"
else
        echo "Calibre is up-to-date"
fi
Now with acrobatics:
Code:
#!/bin/bash
if python calibre-check.py; then
        killall calibre-server
        . backup-library.sh
        sudo python -c "import sys; py3 = sys.version_info[0] > 2; u = __import__('urllib.request' if py3 else 'urllib', fromlist=1); exec(u.urlopen('http://status.calibre-ebook.com/linux_installer').read()); main(install_dir='/opt')"
        calibre-server --port 8080 --restriction Novels --daemonize
        calibre-server --port 8081 --restriction News --daemonize
        calibre-server --port 8082 --restriction DontLetTheKidsSeeThis --daemonize --password=mykidswonteverfindit --username=momndad
else
        echo "Calibre is up-to-date"
fi
Although the three calibre-server commands should rather be in a calibre-servers.sh of their own, so you'll be able to kill/restart whenever you want.
EDIT: newer version of update code here

Last edited by aleyx; 11-19-2013 at 04:58 PM.
aleyx is offline   Reply With Quote