Skip to content

Added a few new things to the makeHAB script #8

@Rick-Jongbloed

Description

@Rick-Jongbloed

Hi,

i've added a few new things to my makeHAB script, which might be nice for the general script:

1: Check for root at the beginning of the script)
if [[ $(id -u) -ne 0 ]] ; then echo "Please run as root" ; exit 1 ; fi

2: Shutting down the openhab service after the files have been downloaded

# Shutting  down openhab2 service
service openhab2 stop

3: setting permissions correctly so the service runs correctly after all the files have been placed.

# Set permissions to user openhab
chown $SERVICEUSER:$SERVICEUSER  /opt/openhab2 -R

4: Starting the openhab service

# Starting openhab service
service openhab2 start

If you think these enhancements are too specific, please close this issue.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions