#!/usr/bin/env zsh s () { eval /Software/Sofin/bin/s ${@} } which psql >/dev/null if [ "0" != "${?}" ]; then s i Postgresql13 fi which cargo >/dev/null if [ "0" != "${?}" ]; then s i Rust fi which diesel >/dev/null if [ "0" != "${?}" ]; then cargo install diesel_cli --no-default-features --features "postgres" s export diesel Rust fi which patchelf >/dev/null if [ "0" != "${?}" ]; then s i Patchelf fi which smartctl >/dev/null if [ "0" != "${?}" ]; then s i Smartmontools fi s env +Git +Postgresql13 +Patchelf +Rust +Smartmontools igni dcollector stop rm -f /Shared/Igniters/dcollector.igni s up s rm dcollector s i dcollector ( cd /tmp; rm -rf dcollector; git clone https://github.com/VerKnowSys/dcollector.git; cd dcollector; rm -rf /Services/Dcollector/migrations; cp -r migrations /Services/Dcollector/; ) ( cd /Services/Dcollector; diesel migration run; ) install -v -m 775 \ src/dcollector.igni \ /Shared/Igniters/dcollector.igni igni dcollector start s env reset