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