helm/install/seedbox

51 lines
1.6 KiB
Plaintext
Raw Normal View History

2013-12-01 13:26:21 -08:00
#!/bin/sh
BASEDIR=$(dirname "$0")
$BASEDIR/python
pip install flexget
pip install transmissionrpc
while [ $# -gt 0 ]; do
case "$1" in
"--daemon")
2013-12-01 13:26:21 -08:00
if is_mac; then
brew install transmission
plistf="~/Library/LaunchAgents/com.flexget.plist"
if [ ! -f "$plistf" ]; then
cat <<-EOF > "$plistf"
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>com.flexget</string>
<key>ProgramArguments</key>
<array>
<string>/usr/local/bin/flexget</string>
<string>--cron</string>
</array>
<key>Nice</key>
<integer>1</integer>
<key>StartInterval</key>
<integer>900</integer>
<key>RunAtLoad</key>
<true/>
</dict>
</plist>
EOF
fi
launchctl load -w "$plistf"
mkdir -p ~/.flexget
vim ~/.flexget/config.yml
2013-12-01 13:26:21 -08:00
elif is_deb; then
sudo add-apt-repository ppa:transmissionbt/ppa
pkg_install transmission-cli transmission-daemon transmission-common
fi
;;
esac
shift
done