Skip to content
This repository has been archived by the owner on May 17, 2021. It is now read-only.

Commit

Permalink
deb packaging: docker support (#4292)
Browse files Browse the repository at this point in the history
* docker support
* deb postinst: removed test -n because it' s not working as expected; rearranged code
  • Loading branch information
theoweiss authored and teichsta committed May 2, 2016
1 parent 4a4e98c commit 87c69aa
Showing 1 changed file with 19 additions and 15 deletions.
34 changes: 19 additions & 15 deletions distribution/src/deb/control-runtime/postinst
Original file line number Diff line number Diff line change
Expand Up @@ -34,21 +34,25 @@ case "$1" in
--gecos "openHAB runtime user" --home /var/lib/openhab "$OH_USER"
fi
# if $2 is set, this is an upgrade
if [ -n $2 ] ; then
startOpenHAB
# this is a fresh installation
elif [ -z $2 ] ; then
if [ -x /bin/systemctl ] ; then
echo "### NOT starting on installation, please execute the following statements to configure openHAB to start automatically using systemd"
echo " sudo /bin/systemctl daemon-reload"
echo " sudo /bin/systemctl enable openhab.service"
echo "### You can start openhab by executing"
echo " sudo /bin/systemctl start openhab.service"
elif [ -x /usr/sbin/update-rc.d ] ; then
echo "### NOT starting openhab by default on bootup, please execute"
echo " sudo update-rc.d openhab defaults"
echo "### In order to start openhab, execute"
echo " sudo /etc/init.d/openhab start"
if [ x"${OH_DOCKER_INSTALLATION}" != x ]; then
echo "docker installation \"${OH_DOCKER_INSTALLATION}\""
else
if [ -z $2 ] ; then
# this is a fresh installation
if [ -x /bin/systemctl ] ; then
echo "### NOT starting on installation, please execute the following statements to configure openHAB to start automatically using systemd"
echo " sudo /bin/systemctl daemon-reload"
echo " sudo /bin/systemctl enable openhab.service"
echo "### You can start openhab by executing"
echo " sudo /bin/systemctl start openhab.service"
elif [ -x /usr/sbin/update-rc.d ] ; then
echo "### NOT starting openhab by default on bootup, please execute"
echo " sudo update-rc.d openhab defaults"
echo "### In order to start openhab, execute"
echo " sudo /etc/init.d/openhab start"
fi
else
startOpenHAB
fi
fi
;;
Expand Down

0 comments on commit 87c69aa

Please sign in to comment.