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

15 lines
513 B
Bash
Raw Normal View History

2023-08-02 12:54:01 -04:00
#!/bin/sh
DIR=$(dirname $(readlink -f "$0"))
cd $DIR
[ ! -e $DIR/probotic ] && echo "You should run './build.sh' before this script." \
&& return
# run bootstrapper
[ ! -e $DIR/bootstrap/ ] && $DIR/bootstrap/bootstrap.sh
# generate directories and install
2023-08-02 12:54:01 -04:00
TARGET=${TARGET-/opt/probotic}
useradd probotic -r -s /sbin/nologin -d $TARGET
2023-08-02 12:54:01 -04:00
mkdir -p $TARGET
install -g probotic -o probotic -m 744 \
2023-08-03 02:16:39 -04:00
$DIR/details.cfg $DIR/bootstrap/probotic_data.sqlite probotic -v $TARGET
2023-08-02 12:54:01 -04:00
chown probotic:probotic $TARGET -R