SOLVED Error 1536 while Running a Bash script, shutting down a Linux Mashine

All kinds of 'OS' scripts

Moderator: leecollings

Post Reply
lara
Posts: 2
Joined: Saturday 16 February 2019 22:30
Target OS: Raspberry Pi / ODroid
Domoticz version:
Location: germany
Contact:

SOLVED Error 1536 while Running a Bash script, shutting down a Linux Mashine

Post by lara »

hi Lara here,

i have problems running a schript on a dummy switch trigger, here is the error message i get:

Code: Select all

2019-02-16 21:13:56.746  Error: Error executing script command 
(/home/pi/domoticz/scripts/sh/shutdownfile.sh). returned: 1536
i try to shut down a Debian server i use to store my files, it is running openmediavault.
the thing is, running the script from the raspberry pies cmd per ssh works fine but when i try to call the script jusing domoticz I just get that error.

here is said script

Code: Select all

#!/bin/bash
sshpass -p 'Password' ssh -t root@Address 'shutdown -h now'
#shuts down a linux client with given adress
i have made the schript escutable and a call of etherwake with another call works fine that looks like this

Code: Select all

#!/bin/bash
wakeonlan MAC-Address
#sends magic package vor given adress.

- kind regards Lara -
Last edited by lara on Sunday 17 February 2019 0:18, edited 1 time in total.
User avatar
waaren
Posts: 6028
Joined: Tuesday 03 January 2017 14:18
Target OS: Linux
Domoticz version: Beta
Location: Netherlands
Contact:

Re: Error 1536 while Running a Bash script, shutting down a Linux Mashine

Post by waaren »

lara wrote: Saturday 16 February 2019 22:52 i have problems running a schript on a dummy switch trigger, here is the error message i get:
returned: 1536

Code: Select all

#!/bin/bash
sshpass -p 'Password' ssh -t root@Address 'shutdown -h now'
Check this where it is advised to first execute the script (as the same user running domoticz) without the sshpass.
Debian buster, bullseye on RPI-4, Intel NUC.
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
lara
Posts: 2
Joined: Saturday 16 February 2019 22:30
Target OS: Raspberry Pi / ODroid
Domoticz version:
Location: germany
Contact:

Re: Error 1536 while Running a Bash script, shutting down a Linux Mashine

Post by lara »

I totally forgot that Domotics may run as a different user, it is running as root and i had to type "yes" to allow to add the fingerprint :lol: :oops:

it is working now though it now trwos a :

Code: Select all

2019-02-16 22:25:37.482  Error: Error executing script command
 (/home/pi/domoticz/scripts/sh/shutdownfile.sh). returned: 65280
on another note, do you a "Hardware" that just sends and reads devices on the serial bus ? if so please point me the right way, so i don't have to write my own plugin compleatly :3

- kind regards Lara -
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest