summarylogtreecommitdiffstats
path: root/surfshark-wireguard-git.install
blob: 0c7c69f15d33a273ba92149de0b57e67f5d20114 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
## arg 1:  the new package version
post_install() {
    if id surfsharkwg ! &>/dev/null; then
        useradd -Urs /usr/bin/nologin surfsharkwg
    fi
    chown root:surfsharkwg /opt/surfshark-wireguard/
    chmod 770 /opt/surfshark-wireguard/
    chown root:surfsharkwg /opt/surfshark-wireguard/gen_wg_config.sh
    chown root:surfsharkwg /opt/surfshark-wireguard/config.json
    echo "Any user wanting start/stop surfshark wireguard must be in surfsharkwg group"
    echo "You must logout and back in before editing /opt/surshark-wireguard/config.json"
    echo "Once your credentials are in place run surfshark-wireguard"
}