mirror of
https://github.com/buanet/ioBroker.docker.git
synced 2025-12-26 10:14:03 +02:00
changes for first run
This commit is contained in:
@@ -57,9 +57,9 @@ RUN chmod +x avahi_startup.sh \
|
|||||||
|
|
||||||
# Install ioBroker
|
# Install ioBroker
|
||||||
WORKDIR /
|
WORKDIR /
|
||||||
RUN echo $(hostname) > /opt/scripts/.install_host \
|
RUN apt-get update \
|
||||||
&& apt-get update \
|
|
||||||
&& curl -sL https://raw.githubusercontent.com/ioBroker/ioBroker/stable-installer/installer.sh | bash - \
|
&& curl -sL https://raw.githubusercontent.com/ioBroker/ioBroker/stable-installer/installer.sh | bash - \
|
||||||
|
&& echo $(hostname) > /opt/iobroker/.install_host \
|
||||||
&& rm -rf /var/lib/apt/lists/*
|
&& rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
# Install node-gyp
|
# Install node-gyp
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
echo 'Preparing...'
|
echo 'Preparing...'
|
||||||
rm /var/run/dbus/pid >/dev/null 2>&1
|
rm /var/run/dbus/pid
|
||||||
dbus-daemon --system
|
dbus-daemon --system
|
||||||
|
|
||||||
echo 'Restarting...'
|
echo 'Restarting...'
|
||||||
|
|||||||
@@ -2,18 +2,22 @@
|
|||||||
|
|
||||||
cd /opt/iobroker
|
cd /opt/iobroker
|
||||||
|
|
||||||
if [ -f /opt/scripts/.install_host ];
|
echo 'Startupscript running...'
|
||||||
|
|
||||||
|
if [ `ls -1a|wc -l` -lt 3 ];
|
||||||
then
|
then
|
||||||
echo 'First run preparation! Used Hostname:' $(hostname)
|
echo 'Directory /opt/iobroker is empty!'
|
||||||
echo 'STEP 1 of 2: Restoring if ioBroker-folder empty...'
|
echo 'Restoring...'
|
||||||
if [ `ls -1a|wc -l` -lt 3 ];
|
|
||||||
then
|
|
||||||
tar -xf /opt/initial_iobroker.tar -C /
|
tar -xf /opt/initial_iobroker.tar -C /
|
||||||
echo 'Restoring done...'
|
echo 'Restoring done...'
|
||||||
fi
|
fi
|
||||||
echo 'STEP 2 of 2: Renaming ioBroker...'
|
|
||||||
iobroker host $(cat /opt/scripts/.install_host)
|
if [ -f /opt/iobroker/.install_host ];
|
||||||
rm /opt/scripts/.install_host
|
then
|
||||||
|
echo 'First run preparation! Used Hostname:' $(hostname)
|
||||||
|
echo 'Renaming ioBroker...'
|
||||||
|
iobroker host $(cat /opt/iobroker/.install_host)
|
||||||
|
rm /opt/iobroker/.install_host
|
||||||
echo 'First run preparation done...'
|
echo 'First run preparation done...'
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user