mirror of
https://github.com/RetroDECK/RetroDECK.git
synced 2024-11-25 07:25: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
|
||||
|
||||
# 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
|
||||
ftp_pid=$!
|
||||
|
|
|
@ -714,7 +714,7 @@ prepare_emulator() {
|
|||
|
||||
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
|
||||
# TODO: do a proper script
|
||||
# This is just a placeholder script to test the emulator's flow
|
||||
|
@ -722,10 +722,10 @@ prepare_emulator() {
|
|||
echo "Initializing FTP Server"
|
||||
echo "------------------------"
|
||||
|
||||
mkdir -p /var/config/umftpd
|
||||
cp /app/tools/ftp/config.json /var/config/umftpd
|
||||
mkdir -p "/var/config/ftp"
|
||||
cp "/app/retrodeck/ftp/*" "/var/config/ftp"
|
||||
# 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
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
anonymous_enable=NO
|
||||
virtual_users=YES
|
||||
userlist_file=/app/retrodeck/ftp/virtual_users.txt
|
||||
userlist_file=/var/config/ftp/virtual_users.txt
|
||||
userlist_enable=YES
|
||||
userlist_deny=NO
|
||||
write_enable=YES
|
||||
|
|
Loading…
Reference in a new issue