forked from pierrickrouxel/iocage-plugin-rtorrent-flood
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpost_install.sh
executable file
·42 lines (29 loc) · 920 Bytes
/
post_install.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
#!/bin/sh
pw useradd rtorrent -g 0 -m
mv /root/.rtorrent.rc /home/rtorrent/.rtorrent.rc
npm install -g forever
# rTorrent startup script
chmod 555 /usr/local/etc/rc.d/rtorrent
sysrc -f /etc/rc.conf rtorrent_enable="YES"
# rTorrent Flood startup script
chmod 555 /usr/local/etc/rc.d/rtorrent_flood
sysrc -f /etc/rc.conf rtorrent_flood_enable="YES"
# Create flood folder
cd /home/rtorrent || exit 1
# Download sources
git clone https://github.com/Flood-UI/flood.git
cd flood || exit 1
cp -rf /root/rtorrent/flood/* .
chown -R rtorrent /home/rtorrent
npm install
npm run build
# Start the service
service rtorrent start
service rtorrent_flood start
echo "Flood ui credentials" > /root/PLUGIN_INFO
echo "User: admin" >> /root/PLUGIN_INFO
echo "Password: admin" >> /root/PLUGIN_INFO
# OpenVPN directory
mkdir /usr/local/etc/openvpn
# Define firewall rules
sysrc -f /etc/rc.conf firewall_script="/etc/ipfw.rules"