This repository has been archived on 2024-03-02. You can view files and clone it, but cannot push or open issues or pull requests.
probotic/install.sh

21 lines
508 B
Bash
Raw Normal View History

2023-08-04 11:13:47 -04:00
#!/bin/sh
2023-08-07 10:04:15 -04:00
echo "./uninstall.sh will destroy to whatever TARGET is set to, be careful!"
# VARIABLES AND PATH
TARGET=${TARGET-/opt/probotic}
2023-08-04 11:13:47 -04:00
DIR=$(dirname $(readlink -f "$0"))
cd $DIR
2023-08-07 10:04:15 -04:00
# BUILD & BOOTSTRAP
make -C $DIR DEBUG=0 NVULN=1 || exit 1
$DIR/bootstrap/bootstrap.sh || exit 1
# INSTALL
2023-08-04 11:13:47 -04:00
mkdir -p $TARGET
2023-08-07 10:04:15 -04:00
useradd probotic -r -s /sbin/nologin -d $TARGET
install -v -g probotic -o probotic -m 744 \
$DIR/bootstrap/probotic_data.sqlite probotic \
$TARGET
2023-08-04 11:13:47 -04:00
chown probotic:probotic $TARGET -R