Announcement

Collapse
No announcement yet.

event that triggers program ZIP wont create zip output

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    event that triggers program ZIP wont create zip output

    zip /home/homeseer/snaps.zip /home/homeseer/snapshot-*

    works from linux command line BUT from inside a HS event, it does nothing. And log shows nothing.

    how to debug?

    thank you.

    #2

    You'll need to execute the shell instead of the command directly. Something like this:
    Click image for larger version

Name:	screenshot.png
Views:	56
Size:	129.7 KB
ID:	1461678

    Make your shell script executable and it should work fine.

    Code:
    homeseer@HS4PiV2:~ $ ls -lt backuphs3.sh
    -rwxrwxrwx 1 homeseer homeseer 159 Aug 17 2020 backuphs3.sh
    
    homeseer@HS4PiV2:~ $ cat backuphs3.sh
    #!/bin/bash
    BACKUP_FILE=HS3_`date +%Y%m%d`.tar.gz
    tar -zcvf /home/homeseer/$BACKUP_FILE /usr/local/HomeSeer
    rm -f $(ls -1tr /home/homeseer/HS3_* |head -n -7)
    HS4Pro on a Raspberry Pi4
    54 Z-Wave Nodes / 21 Zigbee Devices / 108 Events / 767 Devices
    Plugins: Z-Wave / Zigbee Plus / EasyTrigger / AK Weather / OMNI

    HSTouch Clients: 1 Android

    Comment

    Working...
    X