Quote:
Originally Posted by eschwartz
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