Skip to content

Commit

Permalink
update quick-install scripts for debian/raspbian
Browse files Browse the repository at this point in the history
  • Loading branch information
yangxuan8282 committed Nov 25, 2016
1 parent 1d84684 commit b750036
Show file tree
Hide file tree
Showing 4 changed files with 44 additions and 29 deletions.
19 changes: 10 additions & 9 deletions README-zh.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,20 @@
- 播放在线视频(mpv)
- 更多

## Quick Install (Debian/Raspbian)

(将会安装配置 `aria2`, `diana`, `youtube-dl`, 如你已安装 `aria2` 请对照下面的 `安装`部分安装本脚本)

```bash
/bin/bash -c "$(curl -sL https://git.io/vXy3m)"
```

## 安装

安装 `subprocess32` 模块

```bash
sudo apt-get install python-dev
sudo apt-get install python-dev python-pillow
```

```bash
Expand All @@ -35,14 +43,7 @@ sudo pip install subprocess32
下载 `itchat` 框架

```bash
git clone https://github.com/littlecodersh/ItChat
```

然后 `cd` 到目录内, 并下载脚本

```bash
cd ItChat
```
sudo pip install itchat```
```bash
wget https://raw.githubusercontent.com/yangxuan8282/wechat-remote/master/wechat_remote.py
Expand Down
26 changes: 18 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,26 +17,28 @@ This [page](https://github.com/herrbischoff/awesome-command-line-apps) can give
- cast online video
- & more

## How to install
## Quick install (Debian/Raspbian)

You should get itchat first:
(This will install and configure `aria2`, `youtube-dl`, `diana`, if you have installed the `aria2` package, please check `How to install` section.)

```bash
git clone https://github.com/littlecodersh/ItChat
/bin/bash -c "$(curl -sL https://git.io/vXy3m)"
```

then `cd` into the folder, and download the scripts
## How to install

You should get itchat first:

```bash
cd ItChat
sudo apt-get install python-dev python-pillow
```

install `subprocess32`:

```bash
sudo apt-get install python-dev
sudo pip install itchat
```

install `subprocess32`:

```bash
sudo pip install subprocess32
```
Expand Down Expand Up @@ -87,6 +89,14 @@ cd ~
git clone https://github.com/baskerville/diana
```

```bash
cd diana
```

```bash
sudo cp dad diana /usr/bin
```

start:

```bash
Expand Down
2 changes: 1 addition & 1 deletion aria2.service
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ Description=Aria2 Service
After=network.target

[Service]
ExecStart=/usr/bin/aria2c --enable-rpc --rpc-listen-all --rpc-allow-origin-all --save-session %h/.config/aria2/session.lock --input-file %h/.config/aria2/session.lock --conf-path=%h/.config/aria2/aria2.conf
ExecStart=/usr/bin/aria2c --enable-rpc --rpc-listen-all --rpc-allow-origin-all --conf-path=/etc/aria2.conf

[Install]
WantedBy=default.target
26 changes: 15 additions & 11 deletions quick-install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,20 @@ if ! [[ -f /usr/bin/wechat-remote ]]; then
git clone https://github.com/baskerville/diana /tmp/diana
sudo pip install itchat
sudo pip install subprocess32
sudo cp /tmp/diana/diana /usr/bin
sudo cp /tmp/diana/dad /usr/bin
sudo chmod 755 /usr/bin/dad /usr/bin/diana
mkdir -p $HOME/.config/aria2
cp aria2.conf $HOME/.config/aria2/aria2.conf
touch $HOME/.config/aria2/session.lock
sudo cp aria2.service /etc/systemd/user
systemctl --user start aria2
systemctl --user enable aria2
sudo install -Dm 755 /tmp/diana/dad /tmp/diana/diana /usr/bin
sudo cp /tmp/wechat-remote/aria2.conf /etc/aria2.conf
echo "Enter the aria2 download directory (full path) and press [ENTER]: "
read dir
sudo sed -i -e "s|dir=\$HOME|dir=$dir|g" /etc/aria2.conf
sudo sed -i -e "s|input-file=.*|input-file=/var/aria2/session.lock|g" /etc/aria2.conf
sudo sed -i -e "s|save-session=.*|input-file=/var/aria2/session.lock|g" /etc/aria2.conf
sudo mkdir -p /var/aria2
sudo touch /var/aria2/session.lock
sudo cp /tmp/wechat-remote/aria2.service /etc/systemd/system
sudo systemctl daemon-reload
sudo systemctl enable aria2
sudo systemctl start aria2
sudo systemctl status aria2
dad start
sudo cp /tmp/wechat-remote/wechat_remote.py /usr/bin/wechat-remote
sudo chmod 755 /usr/bin/wechat-remote
sudo install -Dm 755 /tmp/wechat-remote/wechat_remote.py /usr/bin/wechat-remote
fi

0 comments on commit b750036

Please sign in to comment.