diff --git a/setup.sh b/setup.sh index 6d239e9..17f484e 100644 --- a/setup.sh +++ b/setup.sh @@ -14,6 +14,8 @@ PIP_EXTRA_INDEX_URL=${PIP_EXTRA_INDEX_URL:-https://pip.grassrootseconomics.net:8 PIP_INDEX_URL=${PIP_INDEX_URL:-"https://pypi.org/simple"} CIC_SETUP_TRUSTED_FINGERPRINT=${CIC_SETUP_TRUSTED_FINGERPRINT:-0826EDA1702D1E87C6E2875121D2E7BB88C2A746} CIC_ROOT_URL=${CIC_ROOT_URL:-https://root.grassrootseconomics.net} +default_python_path=$(dirname $(which python)) +PYTHON_BIN_PATH=${PYTHON_BIN_PATH:-$default_python_path} if [ "$UID" -eq 0 ]; then dbg $dbg_error "This cannot be run as root" diff --git a/setup_systemd.sh b/setup_systemd.sh index e069a0e..30fe278 100644 --- a/setup_systemd.sh +++ b/setup_systemd.sh @@ -6,7 +6,11 @@ mkdir -vp $HOME/.config/environment.d _level=2 _debug=1 -cp -v systemd/*.service $HOME/.config/systemd/user/ +cp -v systemd/cic-cache-server.service $HOME/.config/systemd/user/ +cp -v systemd/bloxberg.service $HOME/.config/systemd/user/ +dbg $dbg_debug "writing rendered services file $p" +PYTHON_BIN_PATH=$PYTHON_BIN_PATH ./aux/bash-templater/templater.sh systemd/cic-cache-tracker.service > $HOME/.config/systemd/user/cic-cache-tracker.service + for f in systemd/env/*.conf; do b=`basename $f` p=$HOME/.config/environment.d/$b diff --git a/systemd/cic-cache-tracker.service b/systemd/cic-cache-tracker.service index 93fb849..21043d0 100644 --- a/systemd/cic-cache-tracker.service +++ b/systemd/cic-cache-tracker.service @@ -3,7 +3,7 @@ Description=CIC transaction cache syncer After=network.target [Service] -ExecStart=%h/.local/bin/cic-cache-trackerd -c %h/.config/cic/cache +ExecStart={{PYTHON_BIN_PATH}}/cic-cache-trackerd -c %h/.config/cic/cache Restart=always [Install]