First commit

This commit is contained in:
2026-05-12 16:43:49 +09:00
commit 12939ed7be
4 changed files with 54 additions and 0 deletions
+2
View File
@@ -0,0 +1,2 @@
# 20260512 tak created gitignore
.DS_Store
+46
View File
@@ -0,0 +1,46 @@
#!/bin/bash
####################################################################################################
# #
# create SFTP, ver 1.0.0 05,April 2024 #
# #
# Copyright2021 ATEC IoT Co.,Ltd All rights reserved #
# #
####################################################################################################
###########################################
# 1. Set sshd_config
###########################################
sed -i '/^Subsystem\s\+sftp\s\+\/usr\/libexec\/sftp-server/d' /etc/ssh/sshd_config
echo "Subsystem sftp internal-sftp" >> /etc/ssh/sshd_config
echo "Match Group cgeslsftp" >> /etc/ssh/sshd_config
echo " ChrootDirectory /sftp/" >> /etc/ssh/sshd_config
echo " ForceCommand internal-sftp -d %u" >> /etc/ssh/sshd_config
###########################################
# 2. Create Account
###########################################
groupadd cgeslsftp
useradd -s /sbin/nologin -g cgeslsftp cgeslsftp
echo 'cgeslsftp:cgESLPassword' | chpasswd
###########################################
# 3. Create Account Directory
###########################################
mkdir -p /sftp/Import
chown cgeslsftp:cgeslsftp /sftp/Import
chmod ugo+rw /sftp/Import
###########################################
# 4. Reboot
###########################################
reboot
exit
####################################################################################################
+5
View File
@@ -0,0 +1,5 @@
echo "Start Send CSV"
cd /home/root/
echo "Execute Send CSV"
./sendCSV.sh >/dev/null 2>&1 &
+1
View File
@@ -0,0 +1 @@
pkill -f sendCSV.sh