FTP: fixed configuration and reset logics

This commit is contained in:
XargonWan 2023-11-08 09:44:09 +01:00
parent 9028da8929
commit 8a3d199018
3 changed files with 6 additions and 6 deletions

View file

@ -12,7 +12,7 @@ if nc -z localhost $port; then
fi fi
# Start FTP server on port $port # Start FTP server on port $port
nohup vsftpd /app/retrodeck/ftp/vsftpd.conf & nohup vsftpd /var/config/ftp/vsftpd.conf &
# Get the PID of the FTP server process # Get the PID of the FTP server process
ftp_pid=$! ftp_pid=$!

View file

@ -714,7 +714,7 @@ prepare_emulator() {
fi fi
# TODO: this is not properly an emulator but le'ts treat like this for the moment # TODO: this is not properly an emulator but let's treat like this for the moment
if [[ "$emulator" =~ ^(ftp|FTP|all)$ ]]; then if [[ "$emulator" =~ ^(ftp|FTP|all)$ ]]; then
# TODO: do a proper script # TODO: do a proper script
# This is just a placeholder script to test the emulator's flow # This is just a placeholder script to test the emulator's flow
@ -722,10 +722,10 @@ prepare_emulator() {
echo "Initializing FTP Server" echo "Initializing FTP Server"
echo "------------------------" echo "------------------------"
mkdir -p /var/config/umftpd mkdir -p "/var/config/ftp"
cp /app/tools/ftp/config.json /var/config/umftpd cp "/app/retrodeck/ftp/*" "/var/config/ftp"
# TODO: this step is to be done properly: Replacing RETRODECKHOMEDIR placeholder # TODO: this step is to be done properly: Replacing RETRODECKHOMEDIR placeholder
sed -i 's#RETRODECKHOMEDIR#'$rdhome'#g' "/var/config/umftpd/config.json" sed -i 's#RETRODECKHOMEDIR#'$rdhome'#g' "/var/config/ftp/vsftpd.conf"
fi fi

View file

@ -2,7 +2,7 @@
anonymous_enable=NO anonymous_enable=NO
virtual_users=YES virtual_users=YES
userlist_file=/app/retrodeck/ftp/virtual_users.txt userlist_file=/var/config/ftp/virtual_users.txt
userlist_enable=YES userlist_enable=YES
userlist_deny=NO userlist_deny=NO
write_enable=YES write_enable=YES