I'm trying to shut down my Odroid-U3 by running a script through [shell]. It's very likely that my approach is not good, but here's what I'm doing:
I've created a directory /etc/my_scripts and in there I put the following script, called "shut_down.sh":
sudo pkill pd sleep 3 sudo pkill jackd sleep 3 sudo poweroff
I launch Jack (actually Qjackctl) and then Pd with -jack. In Pd I have this patch:
[sh /etc/my_scripts/shut_down.sh( | [shell]
On my Raspberry Pi it works, Pd is killed, jackd is killed, and the the Pi shuts down. But on the Odroid it doesn't work. Pd is killed but its windows stay open (I'm using the Odroid via SSH, if this is relevant), and Jack won't quit, and the Odroid won't shut down.
I'm on Pd-0.47-1 and a 14.04 LTS Ubuntu image on the Odroid. I've installed [shell] via apt-get.
Have you tried running the script directly on your odroid to see if it outputs anything relevant?
You're calling sudo with no interaction. does sudo require a password on your odroid?
If you've started pd and jackd with the same user that runs this script you shouldn't have to call sudo. There is also a way to allow the user to call 'poweroff' but I forget how you set that up.. it might be a group that you have to be in.
-Alex
On Wed, Mar 29, 2017 at 9:04 AM, Alexandros Drymonitis adrcki@gmail.com wrote:
I'm trying to shut down my Odroid-U3 by running a script through [shell]. It's very likely that my approach is not good, but here's what I'm doing:
I've created a directory /etc/my_scripts and in there I put the following script, called "shut_down.sh":
sudo pkill pd sleep 3 sudo pkill jackd sleep 3 sudo poweroff
I launch Jack (actually Qjackctl) and then Pd with -jack. In Pd I have this patch:
[sh /etc/my_scripts/shut_down.sh( | [shell]
On my Raspberry Pi it works, Pd is killed, jackd is killed, and the the Pi shuts down. But on the Odroid it doesn't work. Pd is killed but its windows stay open (I'm using the Odroid via SSH, if this is relevant), and Jack won't quit, and the Odroid won't shut down.
I'm on Pd-0.47-1 and a 14.04 LTS Ubuntu image on the Odroid. I've installed [shell] via apt-get.
Pd-list@lists.iem.at mailing list UNSUBSCRIBE and account-management -> https://lists.puredata.info/ listinfo/pd-list
On Wed, Mar 29, 2017 at 7:35 PM, Alex x37v.alex@gmail.com wrote:
Have you tried running the script directly on your odroid to see if it outputs anything relevant?
You're calling sudo with no interaction. does sudo require a password on your odroid?
If you've started pd and jackd with the same user that runs this script you shouldn't have to call sudo. There is also a way to allow the user to call 'poweroff' but I forget how you set that up.. it might be a group that you have to be in.
Running this command enabled me to run poweroff without sudo or a password: sudo chmod a+s /sbin/poweroff Now the script runs fine without using sudo at all, thanks!
On 03/29/2017 06:04 PM, Alexandros Drymonitis wrote:
sudo pkill pd sleep 3 sudo pkill jackd sleep 3 sudo poweroff
why don't you just call poweroff
?
the shutdown process will eventually kill all running processes.
gfmrdsa IOhannes
On Wed, Mar 29, 2017 at 9:41 PM, zmoelnig@iem.at wrote:
On 03/29/2017 06:04 PM, Alexandros Drymonitis wrote:
sudo pkill pd sleep 3 sudo pkill jackd sleep 3 sudo poweroff
why don't you just call
poweroff
? the shutdown process will eventually kill all running processes.
Didn't know that, thought that I had to kill everything first. Works fine this way, thanks!