From 29ad252b1534f616112bb7467722a53aa6a95a12 Mon Sep 17 00:00:00 2001 From: Bram Prieshof Date: Wed, 5 Jun 2019 22:06:57 +0000 Subject: [PATCH] Bestanden uploaden naar '' --- install-photo-import-tool.sh | 59 ++++++++++++++++++++++++++++++++++++ 1 file changed, 59 insertions(+) create mode 100644 install-photo-import-tool.sh diff --git a/install-photo-import-tool.sh b/install-photo-import-tool.sh new file mode 100644 index 0000000..8243652 --- /dev/null +++ b/install-photo-import-tool.sh @@ -0,0 +1,59 @@ +#!/usr/bin/env bash + +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. + +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + +echo "----------------------" +echo "Updating the system..." +echo "----------------------" + +apt update +apt dist-upgrade -y +apt update + +echo "-----------------------------------" +echo "Installing the required packages..." +echo "-----------------------------------" + +apt install acl screen rsync exfat-fuse exfat-utils ntfs-3g gphoto2 libimage-exiftool-perl dialog php cifs-utils sudo -y + +USER="root" + + +mkdir /media/card + +echo "-----------------------------" +echo "Fetching Little Backup Box..." +echo "-----------------------------" + +cd +git clone https://trans.bprieshof.nl/gitea/brammp/little-backup-box-Bram.git + +mkdir /mnt/SMB +cat > /etc/network/if-up.d/mountsmb <<- "EOF" +#! /bin/sh +mount -t cifs -o username=import,password=importpw,iocharset=utf8,sec=ntlmssp,file_mode=0775,dir_mode=0775 //192.168.2.144/Data /mnt/SMB +exit 0 +EOF + +cat > /etc/network/if-up.d/startphpweb <<- "EOF" +#! /bin/sh +cd /root/little-backup-box-Bram/scripts && php -S 0.0.0.0:8000 & +exit 0 + +EOF +echo "---------------------------------------------" +echo "All done! The system will reboot in 1 minute." +echo "---------------------------------------------" + + shutdown -r 1