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

16 lines
526 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 prepare for install
TARGET=${TARGET-/opt/probotic}
mkdir -p $TARGET
useradd -r -s /sbin/nologin probotic -d $TARGET
cp $DIR/bootstrap/probotic_data.sqlite $TARGET
chown probotic:probotic $TARGET -R
# install files
install -g=probotic -o=probotic -m 744 probotic -sv $TARGET