Smooth out installation stuff
This commit is contained in:
7
file-o-bot
Normal file → Executable file
7
file-o-bot
Normal file → Executable file
@ -2,7 +2,12 @@
|
|||||||
|
|
||||||
set -euo
|
set -euo
|
||||||
|
|
||||||
DEFAULT_CONFIG_PATH=.
|
DEFAULT_CONFIG_PATH=/etc/file-o-bot
|
||||||
|
|
||||||
|
if ! [[ -d $DEFAULT_CONFIG_PATH ]]; then
|
||||||
|
printf "Config path not found. Exiting."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
# Read default configs from default config file
|
# Read default configs from default config file
|
||||||
. "${DEFAULT_CONFIG_PATH}"/default-config.ini
|
. "${DEFAULT_CONFIG_PATH}"/default-config.ini
|
||||||
|
12
install.sh
12
install.sh
@ -2,6 +2,14 @@
|
|||||||
|
|
||||||
set -euo
|
set -euo
|
||||||
|
|
||||||
|
. /etc/os-release
|
||||||
|
|
||||||
|
if [[ $ID == "debian" ]]; then
|
||||||
|
apt-get install -y rsync jq parallel
|
||||||
|
elif [[ $ID == "centos" ]]; then
|
||||||
|
yum -y install jq rsync parallel
|
||||||
|
fi
|
||||||
|
|
||||||
mkdir -p /etc/file-o-bot/config.d
|
mkdir -p /etc/file-o-bot/config.d
|
||||||
cd ./install-files/
|
cp file-o-bot /usr/local/bin/file-o-bot
|
||||||
cp -r * /etc/file-o-bot/
|
cp ./install-files/* /etc/file-o-bot/
|
||||||
|
Reference in New Issue
Block a user