summarylogtreecommitdiffstats
path: root/rutorrent.install
blob: b62915394370e90da4d94db35752a8aee0583533 (plain)
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
APP_PATH="/usr/share/webapps/rutorrent"

post_install() {
    cat << EOF

[Webserver Alias Examples]
    Lighttpd: alias.url = ("/rutorrent/" => \""${APP_PATH}/"\")
      Apache: Alias /rutorrent/ /usr/share/webapps/rutorrent/
    Hiawatha: Alias = /rutorrent:/usr/share/webapps/rutorrent
       Nginx: ln -s /usr/share/webapps/rutorrent /srv/http/rutorrent

EOF

post_upgrade
}

post_upgrade() {

    chown -R http:http "${APP_PATH}"
    chmod -R 755 "${APP_PATH}"
    cd "$APP_PATH"

    chmod 750 {conf,share/{users,settings}}
    chmod 777 {tmp,share/torrents}
    chmod 640 {.htaccess,share/.htaccess}
}