21 lines
No EOL
379 B
Bash
Executable file
21 lines
No EOL
379 B
Bash
Executable file
#!/bin/bash
|
|
|
|
if [[ $(/usr/bin/id -u) -ne 0 ]]; then
|
|
echo "Please run this as root"
|
|
exit
|
|
fi
|
|
|
|
# Make sure rust is able to build as root
|
|
rustup default stable
|
|
|
|
# Build crab
|
|
cargo build --release
|
|
|
|
# Copy executable to bin
|
|
cp ./target/release/crab /bin/crab
|
|
chown root:root /bin/crab
|
|
chmod 6755 /bin/crab
|
|
|
|
# Set up config files
|
|
cp pam /etc/pam.d/crab
|
|
cp -n conf /etc/crab.conf |