summarylogtreecommitdiffstats
path: root/torrcli.install
blob: f452744db52dee10fd1ae820e94f31af895da97d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
post_install() {
    sed -i "s/__USER__/$(logname)/" /usr/lib/systemd/system/torrcli.service
    echo "Enabling and starting torrcli service..."
    systemctl daemon-reload
    systemctl enable --now torrcli.service
}

post_upgrade() {
    echo "Reloading daemon and restarting torrcli service..."
    systemctl daemon-reload
    systemctl restart torrcli.service
}

pre_remove() {
    echo "Stopping torrcli service..."
    systemctl stop torrcli.service
    systemctl disable torrcli.service
    systemctl daemon-reload
}