Nekmo / amazon-dash

Hack your Amazon Dash to run what you want.
MIT License
829 stars 67 forks source link

Error installing amazon-dash on dietpi distro #48

Closed alasso closed 6 years ago

alasso commented 6 years ago

Description

Hi and thank you so much for amazon-dash. Great job! I am a newbie with python so, I don't know which is the problem here when I try to install amazon-dash:

root@diet-hass:/etc# python -m amazon_dash.install Executing all install scripts for Amazon-Dash [Already installed] /etc/amazon-dash.yml already exists Traceback (most recent call last): File "/usr/lib/python2.7/runpy.py", line 174, in _run_module_as_main "main", fname, loader, pkg_name) File "/usr/lib/python2.7/runpy.py", line 72, in _run_code exec code in run_globals File "/usr/local/lib/python2.7/dist-packages/amazon_dash/install/main.py", line 3, in catch(cli)() File "/usr/local/lib/python2.7/dist-packages/amazon_dash/install/init.py", line 35, in wrap return fn(*args, kwargs) File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 722, in call return self.main(args, kwargs) File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 697, in main rv = self.invoke(ctx) File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 1066, in invoke return _process_result(sub_ctx.command.invoke(sub_ctx)) File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 895, in invoke return ctx.invoke(self.callback, ctx.params) File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 535, in invoke return callback(args, kwargs) File "/usr/local/lib/python2.7/dist-packages/amazon_dash/install/init.py", line 140, in all has_service = has_service or (service().install() and File "/usr/local/lib/python2.7/dist-packages/amazon_dash/install/init.py", line 59, in install self.is_installable() File "/usr/local/lib/python2.7/dist-packages/amazon_dash/install/init.py", line 95, in is_installable if not get_pid('systemd') or not get_systemd_services_path(): File "/usr/local/lib/python2.7/dist-packages/amazon_dash/install/init.py", line 21, in get_pid return check_output(["pidof", name]) File "/usr/lib/python2.7/subprocess.py", line 219, in check_output raise CalledProcessError(retcode, cmd, output=output) subprocess.CalledProcessError: Command '['pidof', 'systemd']' returned non-zero exit status 1

Any help will be appreciated Adrian

Nekmo commented 6 years ago

Hello! You need to install pidof on your system. I do not know the command in your distribution.

Tell anything you need.

greetings

alasso commented 6 years ago

Thanks Nekmo!

pido exists in system but systemd does not. Look:

root@diet-hass:~# ps -ax | grep systemd 100 ? Ss 7:32 /lib/systemd/systemd-journald 141 ? Ss 0:01 /lib/systemd/systemd-udevd 269 ? Ss 0:00 /usr/bin/dbus-daemon --system --address=systemd: --nofork --nopidfile --systemd-activation 303 ? Ss 0:00 /lib/systemd/systemd-logind 25726 pts/0 S+ 0:00 grep systemd

I think the non-zero return code it not being trapped. May be?

Is there any way to install amazon-dash if systemd alone does not exist in my system?

Thanks a lot for your help. Adrian

Nekmo commented 6 years ago

This seems to be a bug then. The install command is to install the Systemd service and the configuration file. It is not necessary if you do not use Systemd.

However I will solve it. Thank you for your issue!

mochipon commented 6 years ago

I'm also hitting this issue on Ubuntu 18.04 (w/ python 3.6.5).

Nekmo commented 6 years ago

I'm going to change the dependency to "pidof" for another. Thanks for the notice @mochipon

Nekmo commented 6 years ago

Ticket changed to Issue #52