Getting "sudo: not found" message when I ssh in. The sudo reboot command can be switched out for sudo shutdown and the above options above can be used.. That is: -r tells it to restart, hh:mm sets a specific time, … Your Pi cleans up the mess it made, shuts down, and restarts itself. There’s a discussion in the comments, but I never got around to implementing it as I rarely need to reboot openHAB these days.I have some issues with rules after longer runtimes and I tried everything which was suggested in that thread but problem is still up.The solution in that thread was to upgrade your system so that you would have more time-based threads. No sleeps, no whiles, limit calls to executeCommandLine and sendHttp*Request calls.It’s not a problem with the number of cron triggered rules or timers, it’s a problem where they are running at the same time. I want to perfom a “sudo reboot” command directly from openhab.

site design / logo © 2020 Stack Exchange Inc; user contributions licensed under Stack Overflow works best with JavaScript enabled Then you’d only need one time-based rule. Featured on Meta The Overflow Blog #3) With great power comes great responsibility.

Free 30 Day Trial Performing a reboot is equivalent to using a sledgehammer to wash your dishes. Precisely because "cd" is a shell builtin and not a binary, and sudo is not bash (nor even a shell). Detailed answers to any questions you might have site design / logo © 2020 Stack Exchange Inc; user contributions licensed under To shut down your Pi when you’ve finished using it, type the following command and press Enter: sudo …

To reboot your Pi, type the following command and press Enter: sudo reboot. reboot. That enables things like lights and rollershutters to adjust with the seasons, which I personally find to be preferable over “always do this at 7:00AM”.If you’re committed to things happening at specific times, then you could set up a time-based rule that updates a proxy item, and trigger all of your other rules based on the proxy item changing. E.g. Replace user@server.com with the username @ server name that you want to restart.. So sudo can't find any "cd" command. To make sure that you have the minimum number running at a time you need to make sure your rules run fast. I already found some tutorials to perfrom linux commands but I’m really not a Linux / Raspberry expert… so unfortunately it isn’t working. This question appears to be off-topic because it is not about programming or development. #2) Think before you type.

Get the Thanks for this! By default, the You should specify the full path. I just installed hassIO for the first time today and as I'm setting things up and trying to get some Z-Wave devices working I've run into a wall where I can't seem to run any commands from SSH via PuTTy.

So as I understand, it will execute ./start.sh after restart right?

By clicking “Post Your Answer”, you agree to our To subscribe to this RSS feed, copy and paste this URL into your RSS reader. By clicking “Post Your Answer”, you agree to our To subscribe to this RSS feed, copy and paste this URL into your RSS reader. The key is how many are running at the same time.

Instead of asking openHAB to do more than it’s capable of doing, let’s rethink how your rules work.So the question is, how do you reduce the number of time-based rules you need? Anybody can ask a question You can have a million timers and cron triggered rules as long as fewer than ten are running at the same time (for earlier versions of OH that number is 2).NOTE: both cron triggered rules and timers execute out of the same thread pool.It’s not a problem with the number of cron triggered rules or timers, it’s a problem where they are running at the same time.Also avoid the typical mistake to start most stuff at the same time (full hour etc). Just don’t go over 10 and you should be fine.Would this work or would I have the similiar issue because the big amount of timers?I suggest trying to fix the underlying issue (rules) instead of covering up the symptom (reboot).Of course I would create the rules in the way that not all timers are running at the same time.In case you want to know the reason why I want to do this… please check my old threadDid you manage to update to OH 2.5? Incidentally, the command sudo shutdown ... but most people actually use the following command to reboot their computer: sudo shutdown -r. The same rules apply to the reboot command as they do for the shutdown command. I created 24 for items (switches) one item per full hour. Sorry if this is a very basic question, but I am not … However when I do @reboot cd my_project_path; ./start.sh I get -bash: @reboot: command not found.How do I include reboot command in bash? Administrator. I am trying to execute a script on server. UNIX is a registered trademark of The Open Group. BTW, the new rule engine does not have this limitation…I have no other idea on how to handle it differntly.The key isn’t how many rules you have that are cron triggered. putty, you are running as user openhabian.

If you’re running more than 10 time-based rules (which I assume to be the case), then it’s not a problem with the system; it’s a problem with your approach. I think I also have to make some changes in the “configuration” but I dont know espscially what I have to do.In case you want to know the reason why I want to do this… please check my old thread FYI: when you login with e.g. $ sudo apt update $ sudo apt upgrade Reboot the Linux system if a new Linux kernel was installed using the reboot command or shutdown command: $ sudo reboot. and trigger rules on those changes.

Hey guys, I need some help again.