Compare commits
53 Commits
Author | SHA1 | Date | |
---|---|---|---|
3cf2005aa8 | |||
c7b718b8c6 | |||
4afaa7274f | |||
adab42c317 | |||
d5814960b0 | |||
8efefb0c2e | |||
ec8d0e37a7 | |||
48ffafeb2b | |||
0203978a21 | |||
63603dd283 | |||
e9d4df75ca | |||
15037da38e | |||
3e81c9654c | |||
11eab64d7e | |||
912736b291 | |||
987118deef | |||
144d2d1ba2 | |||
69b8020be0 | |||
d5c6cf447a | |||
48881f870b | |||
e73900665c
|
|||
f97c58fee2
|
|||
0d347180fc
|
|||
6f117d10cb
|
|||
565d1a751f
|
|||
1e720e2158
|
|||
2f9c782ed9
|
|||
1b1155c5d6
|
|||
29ad61c13f
|
|||
efe919df0b
|
|||
280665d101
|
|||
0c806075a4
|
|||
b58bf993f3
|
|||
c83d05e85b
|
|||
0a19f6b42d
|
|||
6223307f32
|
|||
e224de57d3
|
|||
c40f09cb59
|
|||
941231c224
|
|||
0fc42f78e7
|
|||
b535352780
|
|||
82e6ce9188
|
|||
1640fbdfb2
|
|||
d93611ade4
|
|||
2de1025fc0
|
|||
0e09c53a45
|
|||
e4d4c3ee77
|
|||
a4a45bf6b8
|
|||
ff51a9a0ac
|
|||
5e22f1c96a
|
|||
dc8b22f51f
|
|||
c17465423f
|
|||
53e885e437
|
1
.github/FUNDING.yml
vendored
Normal file
@@ -0,0 +1 @@
|
||||
github: ich777
|
24
Dockerfile
@@ -1,19 +1,23 @@
|
||||
FROM ich777/novnc-baseimage
|
||||
|
||||
LABEL maintainer="admin@minenet.at"
|
||||
LABEL org.opencontainers.image.authors="admin@minenet.at"
|
||||
LABEL org.opencontainers.image.source="https://github.com/ich777/docker-luckybackup"
|
||||
|
||||
RUN export TZ=Europe/Rome && \
|
||||
echo "deb http://ftp.de.debian.org/debian/ testing main contrib non-free" >> /etc/apt/sources.list && \
|
||||
apt-get update && \
|
||||
ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && \
|
||||
echo $TZ > /etc/timezone && \
|
||||
apt-get -y install --no-install-recommends fonts-takao libqtcore4 libqtgui4 libc6 libgcc1 libstdc++6 libqt4-network cron ssh ssh-askpass sendemail && \
|
||||
apt-get -y -t testing install rsync && \
|
||||
apt-get -y install --no-install-recommends curl libqt5core5a qtscript5-dev libc6 libgcc1 libcanberra-gtk3-0 libcairomm-1.0-1v5 libatkmm-1.6-1v5 libcanberra-gtk3-module libcanberra0 libstdc++6 libgtkmm-3.0-1v5 libglibmm-2.4-1v5 libpangomm-1.4-1v5 libsigc++-2.0-0v5 libqt5network5 rsync cron ssh ssh-askpass sendemail jq libnet-ssleay-perl libio-socket-ssl-perl ttf-wqy-zenhei fonts-wqy-microhei fonts-takao fonts-arphic-uming fonts-noto-cjk && \
|
||||
echo "ko_KR.UTF-8 UTF-8" >> /etc/locale.gen && \
|
||||
echo "ja_JP.UTF-8 UTF-8" >> /etc/locale.gen && \
|
||||
locale-gen && \
|
||||
rm -rf /var/lib/apt/lists/* && \
|
||||
wget -O /tmp/sendemail_1.56-5.2_all.deb http://ftp.de.debian.org/debian/pool/main/s/sendemail/sendemail_1.56-5.2_all.deb && \
|
||||
apt -y install /tmp/sendemail_1.56-5.2_all.deb && \
|
||||
rm -rf /var/lib/apt/lists/* /tmp/sendemail_1.56-5.2_all.deb && \
|
||||
sed -i '/ document.title =/c\ document.title = "luckyBackup - noVNC";' /usr/share/novnc/app/ui.js && \
|
||||
wget -q -O /tmp/luckybackup.tar.gz https://github.com/ich777/luckyBackup/releases/download/0.5.0/luckyBackup-v0.5.0.tar.gz && \
|
||||
tar -C / -xf /tmp/luckybackup.tar.gz && \
|
||||
rm -rf /tmp/luckybackup.tar.gz && \
|
||||
rm /usr/share/novnc/app/images/icons/*
|
||||
|
||||
RUN mkdir -p /run/sshd && \
|
||||
@@ -22,12 +26,15 @@ RUN mkdir -p /run/sshd && \
|
||||
sed -i "/#ListenAddress 0.0.0.0/c\ListenAddress 0.0.0.0" /etc/ssh/sshd_config && \
|
||||
sed -i "/#HostKey \/etc\/ssh\/ssh_host_rsa_key/c\HostKey \/luckybackup\/.ssh\/ssh_host_rsa_key" /etc/ssh/sshd_config && \
|
||||
sed -i "/#HostKey \/etc\/ssh\/ssh_host_ecdsa_key/c\HostKey \/luckybackup\/.ssh\/ssh_host_ecdsa_key" /etc/ssh/sshd_config && \
|
||||
sed -i "/#HostKey \/etc\/ssh\/ssh_host_ed25519_key/c\HostKey \/luckybackup\/.ssh\/ssh_host_ed25519_key" /etc/ssh/sshd_config
|
||||
sed -i "/#HostKey \/etc\/ssh\/ssh_host_ed25519_key/c\HostKey \/luckybackup\/.ssh\/ssh_host_ed25519_key" /etc/ssh/sshd_config && \
|
||||
sed -i "/HashKnownHosts yes/c\ HashKnownHosts no" /etc/ssh/ssh_config && \
|
||||
sed -i "/StrictHostKeyChecking ask/c\ StrictHostKeyChecking no" /etc/ssh/ssh_config
|
||||
|
||||
ENV DATA_DIR=/luckybackup
|
||||
ENV CUSTOM_RES_W=1024
|
||||
ENV CUSTOM_RES_H=768
|
||||
ENV CUSTOM_DEPTH=16
|
||||
ENV CRON_WATCHDOG=60
|
||||
ENV NOVNC_PORT=8080
|
||||
ENV RFB_PORT=5900
|
||||
ENV TURBOVNC_PARAMS="-securitytypes none"
|
||||
@@ -41,19 +48,18 @@ RUN mkdir $DATA_DIR && \
|
||||
useradd -d $DATA_DIR -s /bin/bash $USER && \
|
||||
chown -R $USER $DATA_DIR && \
|
||||
mkdir /etc/.fluxbox && \
|
||||
rm -R /var/spool/cron/crontabs/ && \
|
||||
ulimit -n 2048
|
||||
|
||||
ADD /scripts/ /opt/scripts/
|
||||
#COPY /icons/* /usr/share/novnc/app/images/icons/
|
||||
COPY /icons/* /usr/share/novnc/app/images/icons/
|
||||
COPY /conf/ /etc/.fluxbox/
|
||||
COPY /cron /tmp/
|
||||
RUN chmod -R 770 /opt/scripts/ && \
|
||||
chown -R root:$GID /usr/share && \
|
||||
chmod -R 775 /usr/share && \
|
||||
chown -R ${UID}:${GID} /mnt && \
|
||||
chmod -R 770 /mnt
|
||||
|
||||
|
||||
EXPOSE 8080
|
||||
|
||||
#Server Start
|
||||
|
19
README.md
@@ -3,10 +3,15 @@ LuckyBackup is a very user-friendly GUI backup program. It uses rsync as a backe
|
||||
|
||||
**Update:** The container will check on every start/restart if there is a newer version available
|
||||
|
||||
**Cron:** If you create a cron job please be sure to tick the "Console Mode" checkbox, otherwise the cron jobs will not work.
|
||||
|
||||
**Language:** If you want to change the language make sure to exit luckyBackup from within the WebGUI by clicking 'Profile -> Quit' or CTRL +X otherwise the language change isn't saved.
|
||||
|
||||
## Env params
|
||||
| Name | Value | Example |
|
||||
| --- | --- | --- |
|
||||
| DATA_DIR | Folder for configfiles and the application | /luckybackup |
|
||||
| ROOT | Run luckyBackup as root, this is only needed if you want to create backups from directories that require root privileges, set to 'true' to run luckyBackup as root | false |
|
||||
| UID | User Identifier | 99 |
|
||||
| GID | Group Identifier | 100 |
|
||||
| UMASK | Umask value for new created files | 0000 |
|
||||
@@ -25,6 +30,20 @@ docker run --name luckyBackup -d \
|
||||
ich777/luckybackup
|
||||
```
|
||||
|
||||
## Set VNC Password:
|
||||
Please be sure to create the password first inside the container, to do that open up a console from the container (Unraid: In the Docker tab click on the container icon and on 'Console' then type in the following):
|
||||
|
||||
1) **su $USER**
|
||||
2) **vncpasswd**
|
||||
3) **ENTER YOUR PASSWORD TWO TIMES AND PRESS ENTER AND SAY NO WHEN IT ASKS FOR VIEW ACCESS**
|
||||
|
||||
Unraid: close the console, edit the template and create a variable with the `Key`: `TURBOVNC_PARAMS` and leave the `Value` empty, click `Add` and `Apply`.
|
||||
|
||||
All other platforms running Docker: create a environment variable `TURBOVNC_PARAMS` that is empty or simply leave it empty:
|
||||
```
|
||||
--env 'TURBOVNC_PARAMS='
|
||||
```
|
||||
|
||||
This Docker was mainly edited for better use with Unraid, if you don't use Unraid you should definitely try it!
|
||||
|
||||
#### Support Thread: https://forums.unraid.net/topic/83786-support-ich777-application-dockers/
|
@@ -4,4 +4,5 @@
|
||||
session.styleFile: /usr/share/fluxbox/styles//Squared_for_Debian
|
||||
session.configVersion: 13
|
||||
session.screen0.toolbar.autoHide: false
|
||||
session.screen0.toolbar.visible: false
|
||||
session.screen0.toolbar.visible: true
|
||||
session.screen0.toolbar.tools: iconbar
|
BIN
icons/novnc-ios-120.png
Normal file
After Width: | Height: | Size: 19 KiB |
BIN
icons/novnc-ios-152.png
Normal file
After Width: | Height: | Size: 28 KiB |
BIN
icons/novnc-ios-167.png
Normal file
After Width: | Height: | Size: 32 KiB |
BIN
icons/novnc-ios-180.png
Normal file
After Width: | Height: | Size: 36 KiB |
BIN
icons/novnc-ios-40.png
Normal file
After Width: | Height: | Size: 3.5 KiB |
BIN
icons/novnc-ios-58.png
Normal file
After Width: | Height: | Size: 6.2 KiB |
BIN
icons/novnc-ios-60.png
Normal file
After Width: | Height: | Size: 6.5 KiB |
BIN
icons/novnc-ios-80.png
Normal file
After Width: | Height: | Size: 10 KiB |
BIN
icons/novnc-ios-87.png
Normal file
After Width: | Height: | Size: 12 KiB |
BIN
icons/novnc.ico
Normal file
After Width: | Height: | Size: 487 KiB |
27
scripts/init-root.sh
Normal file
@@ -0,0 +1,27 @@
|
||||
#!/bin/bash
|
||||
echo "---Initializing server, please wait...---"
|
||||
#!/bin/bash
|
||||
export DISPLAY=:0
|
||||
export XAUTHORITY=${DATA_DIR}/.Xauthority
|
||||
export XDG_RUNTIME_DIR=/tmp/runtime-luckybackup
|
||||
|
||||
rm -rf /tmp/.X0*
|
||||
rm -rf /tmp/.X11*
|
||||
rm -rf ${DATA_DIR}/.vnc/*.log ${DATA_DIR}/.vnc/*.pid
|
||||
chmod -R ${DATA_PERM} ${DATA_DIR}
|
||||
if [ -f ${DATA_DIR}/.vnc/passwd ]; then
|
||||
chmod 600 ${DATA_DIR}/.vnc/passwd
|
||||
fi
|
||||
screen -wipe 2&>/dev/null
|
||||
|
||||
vncserver -geometry ${CUSTOM_RES_W}x${CUSTOM_RES_H} -depth ${CUSTOM_DEPTH} :0 -rfbport ${RFB_PORT} -noxstartup ${TURBOVNC_PARAMS} 2>/dev/null
|
||||
sleep 2
|
||||
screen -d -m env HOME=/etc /usr/bin/fluxbox
|
||||
sleep 2
|
||||
|
||||
cd ${DATA_DIR}
|
||||
timeout 5 /usr/bin/luckybackup
|
||||
|
||||
echo "-----Initialisation complete please restart the container-----"
|
||||
echo "---please restart the container if it doesn't auto restart!---"
|
||||
echo
|
@@ -1,7 +0,0 @@
|
||||
until cron -- p ; do
|
||||
echo "cron crashed with exit code $?. Respawning.." >&2
|
||||
if [ -f /var/run/crond.pid ]; then
|
||||
rm -rf /var/run/crond.pid
|
||||
fi
|
||||
sleep 1
|
||||
done
|
@@ -1,50 +1,7 @@
|
||||
#!/bin/bash
|
||||
export DISPLAY=:0
|
||||
export XAUTHORITY=${DATA_DIR}/.Xauthority
|
||||
|
||||
Xvfb :0 -screen scrn 800x600x16 2>/dev/null &
|
||||
|
||||
LAT_V="$(wget -qO- https://github.com/ich777/versions/raw/master/luckyBackup | grep FORK | cut -d '=' -f2)"
|
||||
CUR_V="$(${DATA_DIR}/luckybackup --version 2> /dev/null | grep "version:" | cut -d ':' -f2 | xargs)"
|
||||
if [ -z $LAT_V ]; then
|
||||
if [ -z $CUR_V ]; then
|
||||
echo "---Can't get latest version of luckyBackup, putting container into sleep mode!---"
|
||||
sleep infinity
|
||||
else
|
||||
echo "---Can't get latest version of luckyBackup, falling back to v$CUR_V---"
|
||||
LAT_V="${CUR_V}"
|
||||
fi
|
||||
fi
|
||||
|
||||
kill -SIGTERM $(pidof Xvfb)
|
||||
|
||||
echo "---Version Check---"
|
||||
if [ -z "$CUR_V" ]; then
|
||||
echo "---luckyBackup not found, downloading and installing v$LAT_V...---"
|
||||
cd ${DATA_DIR}
|
||||
if wget -q -nc --show-progress --progress=bar:force:noscroll -O ${DATA_DIR}/luckyBackup-v$LAT_V.tar.gz "https://github.com/ich777/luckyBackup/releases/download/$LAT_V/luckyBackup-v${LAT_V}.tar.gz" ; then
|
||||
echo "---Successfully downloaded luckyBackup v$LAT_V---"
|
||||
else
|
||||
echo "---Something went wrong, can't download luckyBackup v$LAT_V, putting container into sleep mode!---"
|
||||
sleep infinity
|
||||
fi
|
||||
tar -C / --overwrite -xf ${DATA_DIR}/luckyBackup-v$LAT_V.tar.gz 2> /dev/null
|
||||
rm ${DATA_DIR}/luckyBackup-v$LAT_V.tar.gz
|
||||
elif [ "$CUR_V" != "$LAT_V" ]; then
|
||||
echo "---Version missmatch, installed v$CUR_V, downloading and installing latest v$LAT_V...---"
|
||||
cd ${DATA_DIR}
|
||||
rm -R ${DATA_DIR}/luckybackup*
|
||||
if wget -q -nc --show-progress --progress=bar:force:noscroll -O ${DATA_DIR}/luckyBackup-v$LAT_V.tar.gz "https://github.com/ich777/luckyBackup/releases/download/$LAT_V/luckyBackup-v${LAT_V}.tar.gz" ; then
|
||||
echo "---Successfully downloaded luckyBackup v$LAT_V---"
|
||||
else
|
||||
echo "---Something went wrong, can't download luckyBackup v$LAT_V, putting container into sleep mode!---"
|
||||
sleep infinity
|
||||
fi
|
||||
tar -C / --overwrite -xf ${DATA_DIR}/luckyBackup-v$LAT_V.tar.gz 2> /dev/null
|
||||
rm ${DATA_DIR}/luckyBackup-v$LAT_V.tar.gz
|
||||
elif [ "$CUR_V" == "$LAT_V" ]; then
|
||||
echo "---luckyBackup v$CUR_V up-to-date---"
|
||||
fi
|
||||
export XDG_RUNTIME_DIR=/tmp/runtime-luckybackup
|
||||
|
||||
echo "---Preparing Server---"
|
||||
if [ ! -d ${DATA_DIR}/.ssh ]; then
|
||||
@@ -68,8 +25,6 @@ if [ ! -f ${DATA_DIR}/.ssh/ssh_host_ed25519_key ]; then
|
||||
else
|
||||
echo "---ssh_host_ed25519_key found!---"
|
||||
fi
|
||||
sed -i "/LuckyBackupDir=/c\LuckyBackupDir=${DATA_DIR}/.luckyBackup" ${DATA_DIR}/.luckyBackup/profiles/*.profile 2>/dev/null
|
||||
sed -i "/Default_Profile=/c\Default_Profile=${DATA_DIR}/.luckyBackup/profiles/default.profile" ${DATA_DIR}/.luckyBackup/settings.ini 2>/dev/null
|
||||
echo "---Starting ssh daemon---"
|
||||
/usr/sbin/sshd
|
||||
sleep 2
|
||||
@@ -96,16 +51,25 @@ rm -rf /tmp/.X11*
|
||||
rm -rf ${DATA_DIR}/.vnc/*.log ${DATA_DIR}/.vnc/*.pid
|
||||
chmod -R ${DATA_PERM} ${DATA_DIR}
|
||||
if [ -f ${DATA_DIR}/.vnc/passwd ]; then
|
||||
chmod 600 ${DATA_DIR}/.vnc/passwd
|
||||
if [ "${ROOT}" == "true" ]; then
|
||||
chmod 600 /root/.vnc/passwd
|
||||
else
|
||||
chmod 600 ${DATA_DIR}/.vnc/passwd
|
||||
fi
|
||||
fi
|
||||
screen -wipe 2&>/dev/null
|
||||
chmod 700 ${DATA_DIR}/.ssh
|
||||
chmod 600 ${DATA_DIR}/.ssh/*
|
||||
chown ${UID}:crontab ${DATA_DIR}/.config/crontabs/*
|
||||
chmod 600 ${DATA_DIR}/.config/crontabs/*
|
||||
if [ ! "$(crontab -l 2>/dev/null)" ]; then
|
||||
if [ ! -f ${DATA_DIR}/.luckyBackup/schedule/luckyCron.txt ]; then
|
||||
crontab /tmp/cron
|
||||
else
|
||||
crontab ${DATA_DIR}/.luckyBackup/schedule/luckyCron.txt
|
||||
fi
|
||||
fi
|
||||
|
||||
echo "---Starting TurboVNC server---"
|
||||
vncserver -geometry ${CUSTOM_RES_W}x${CUSTOM_RES_H} -depth ${CUSTOM_DEPTH} :0 -rfbport ${RFB_PORT} -noxstartup ${TURBOVNC_PARAMS} 2>/dev/null
|
||||
vncserver -geometry ${CUSTOM_RES_W}x${CUSTOM_RES_H} -depth ${CUSTOM_DEPTH} :0 -rfbport ${RFB_PORT} -noxstartup -noserverkeymap ${TURBOVNC_PARAMS} 2>/dev/null
|
||||
sleep 2
|
||||
echo "---Starting Fluxbox---"
|
||||
screen -d -m env HOME=/etc /usr/bin/fluxbox
|
||||
@@ -119,4 +83,4 @@ sleep 2
|
||||
|
||||
echo "---Starting luckyBackup---"
|
||||
cd ${DATA_DIR}
|
||||
${DATA_DIR}/luckybackup
|
||||
/usr/bin/luckybackup
|
@@ -1,51 +1,61 @@
|
||||
#!/bin/bash
|
||||
echo "---Checking if UID: ${UID} matches user---"
|
||||
echo "---Ensuring UID: ${UID} matches user---"
|
||||
usermod -u ${UID} ${USER}
|
||||
echo "---Checking if GID: ${GID} matches user---"
|
||||
echo "---Ensuring GID: ${GID} matches user---"
|
||||
groupmod -g ${GID} ${USER} > /dev/null 2>&1 ||:
|
||||
usermod -g ${GID} ${USER}
|
||||
echo "---Setting umask to ${UMASK}---"
|
||||
umask ${UMASK}
|
||||
|
||||
echo "---Checking for optional scripts---"
|
||||
if [ -f /opt/scripts/user.sh ]; then
|
||||
echo "---Found optional script, executing---"
|
||||
chmod +x /opt/scripts/user.sh
|
||||
/opt/scripts/user.sh
|
||||
cp -f /opt/custom/user.sh /opt/scripts/start-user.sh > /dev/null 2>&1 ||:
|
||||
cp -f /opt/scripts/user.sh /opt/scripts/start-user.sh > /dev/null 2>&1 ||:
|
||||
|
||||
if [ -f /opt/scripts/start-user.sh ]; then
|
||||
echo "---Found optional script, executing---"
|
||||
chmod -f +x /opt/scripts/start-user.sh ||:
|
||||
/opt/scripts/start-user.sh || echo "---Optional Script has thrown an Error---"
|
||||
else
|
||||
echo "---No optional script found, continuing---"
|
||||
echo "---No optional script found, continuing---"
|
||||
fi
|
||||
|
||||
echo "---Checking configuration for noVNC---"
|
||||
novnccheck
|
||||
|
||||
echo "---Starting...---"
|
||||
chown -R root:${GID} /opt/scripts
|
||||
chmod -R 750 /opt/scripts
|
||||
chown -R ${UID}:${GID} /var/spool/cron
|
||||
if [ ! -d ${DATA_DIR}/.config/crontabs ]; then
|
||||
mkdir -p ${DATA_DIR}/.config/crontabs
|
||||
fi
|
||||
echo "---Starting cron---"
|
||||
if [ -f /var/run/crond.pid ]; then
|
||||
rm -rf /var/run/crond.pid
|
||||
fi
|
||||
ln -s /luckybackup/.config/crontabs /var/spool/cron/crontabs 2>/dev/null
|
||||
ln -s /luckybackup/luckybackup /usr/bin/luckybackup 2>/dev/null
|
||||
chown -R ${UID}:${GID} ${DATA_DIR}
|
||||
echo "---Starting cron---"
|
||||
/opt/scripts/start-cron.sh &
|
||||
export PATH=/bin:/usr/bin:${DATA_DIR}:$PATH
|
||||
/usr/sbin/cron -- p
|
||||
|
||||
echo "---Taking ownership of data...---"
|
||||
chown -R root:${GID} /opt/scripts
|
||||
chmod -R 750 /opt/scripts
|
||||
chown -R ${UID}:${GID} ${DATA_DIR}
|
||||
|
||||
echo "---Starting...---"
|
||||
term_handler() {
|
||||
kill -SIGTERM "$killpid"
|
||||
wait "$killpid" -f 2>/dev/null
|
||||
if [ "${ROOT}" != "true" ]; then
|
||||
su ${USER} -c 'export DISPLAY=:0; export XAUTHORITY=${DATA_DIR}/.Xauthority; export XDG_RUNTIME_DIR=/tmp/runtime-luckybackup; wmctrl -l | grep "luckyBackup" | awk "{print \$1}" | xargs -I {} wmctrl -ic {}'
|
||||
else
|
||||
export DISPLAY=:0; export XAUTHORITY=${DATA_DIR}/.Xauthority; export XDG_RUNTIME_DIR=/tmp/runtime-luckybackup; wmctrl -l | grep "luckyBackup" | awk "{print \$1}" | xargs -I {} wmctrl -ic {}
|
||||
fi
|
||||
sleep 2
|
||||
tail --pid=$(pidof luckybackup) -f 2>/dev/null
|
||||
exit 143;
|
||||
}
|
||||
|
||||
trap 'kill ${!}; term_handler' SIGTERM
|
||||
if [ "${ROOT}" != "true" ]; then
|
||||
if [ -d /tmp/runtime-luckybackup ]; then
|
||||
chown -R ${UID}:${GID} /tmp/runtime-luckybackup
|
||||
fi
|
||||
su ${USER} -c "/opt/scripts/start-server.sh" &
|
||||
else
|
||||
if [ ! -d ${DATA_DIR}/.luckyBackup ]; then
|
||||
mkdir -p ${DATA_DIR}/.luckyBackup
|
||||
su ${USER} -c "/opt/scripts/init-root.sh"
|
||||
exit 0
|
||||
fi
|
||||
if [ ! -d /root/.luckyBackup ]; then
|
||||
mkdir -p /root/.luckyBackup
|
||||
@@ -53,6 +63,13 @@ else
|
||||
rm -rf /root/.luckyBackup
|
||||
mkdir -p /root/.luckyBackup
|
||||
fi
|
||||
if [ -d /tmp/runtime-luckybackup ]; then
|
||||
chown -R root:root /tmp/runtime-luckybackup
|
||||
fi
|
||||
if [ -f ${DATA_DIR}/.vnc/passwd ]; then
|
||||
mkdir -p /root/.vnc 2 >/dev/null
|
||||
cp ${DATA_DIR}/.vnc/passwd /root/.vnc/passwd
|
||||
fi
|
||||
ln -s ${DATA_DIR}/.luckyBackup/* /root/.luckyBackup/
|
||||
/opt/scripts/start-server.sh &
|
||||
fi
|
||||
|