Skip to content

Commit

Permalink
Fix python invocations on Debian-based systems (#388)
Browse files Browse the repository at this point in the history
Some linux distributions don't by default link python to any version and python3 has to be invoked.
  • Loading branch information
hagen-bauer-regioit authored Nov 29, 2024
1 parent d73bdd7 commit ae4aadd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions bin/opencanaryd
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ elif [ "${cmd}" == "--dev" ]; then
warn_drop_privileges
sudo -E "${DIR}/twistd" -noy "${DIR}/opencanary.tac" ${TWISTD_UID_FLAG:-} ${TWISTD_GID_FLAG:-}
elif [ "${cmd}" == "--usermodule" ]; then
usermodconf=$(python -c "from pkg_resources import resource_filename; print(resource_filename('opencanary', 'data/settings-usermodule.json'))")
usermodconf=$(python3 -c "from pkg_resources import resource_filename; print(resource_filename('opencanary', 'data/settings-usermodule.json'))")

if [ -f opencanary.conf ]; then
if ! diff -q opencanary.conf "${usermodconf}" 2>&1 >/dev/null; then
Expand Down Expand Up @@ -87,7 +87,7 @@ elif [ "${cmd}" == "--copyconfig" ]; then
echo -e "[*] A sample config file is ready /etc/opencanaryd/opencanary.conf\n"
echo "[*] Edit your configuration, then launch with \"opencanaryd --start\""
elif [ "${cmd}" == "--version" ]; then
python -c "from opencanary import __version__; print(__version__);"
python3 -c "from opencanary import __version__; print(__version__);"
else
usage
exit 1
Expand Down

0 comments on commit ae4aadd

Please sign in to comment.