Files
Server-APP/install-photo-import-tool.sh

41 lines
1.0 KiB
Bash

#!/usr/bin/env bash
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 php cifs-utils sudo -y
echo "-----------------------------"
echo "Setting-up Server-APP..."
echo "-----------------------------"
mkdir /media/card
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/Server-APP/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