summaryrefslogtreecommitdiff
path: root/deployments/source/install.sh
blob: 5b95a83c7fb939c5ade7c819107406c072584e6f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#!/bin/bash

if [[ $(/usr/bin/id -u) -ne 0 ]]; then
    echo "Please run this as root"
    exit
fi

# Copy executable to bin
cp ./target/release/crab /usr/bin/crab
chown root:root /bin/crab
chmod 4755 /bin/crab

# Set up config files
cp pam /etc/pam.d/crab
chmod 600 /etc/pam.d/crab

mkdir /usr/share/crab
chmod 644 /usr/share/crab

cp conf /usr/share/crab/crab.conf
chmod 644 /usr/share/crab/crab.conf