mirror of
https://github.com/RetroDECK/RetroDECK.git
synced 2024-11-22 05:55:38 +00:00
FTP: fixed configuration and reset logics
This commit is contained in:
parent
9028da8929
commit
8a3d199018
|
@ -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=$!
|
||||||
|
|
|
@ -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
|
||||||
|
|
||||||
|
|
|
@ -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
|
||||||
|
|
Loading…
Reference in a new issue