root@SegateNas:/ # ls -l /direct-usb
total 8
lrwxrwxrwx 1 root root 11 2018-01-01 20:48 1000 -> /share/1000
drwxr-xr-x 3 root root 4096 2023-09-27 18:53 fvdw
drwxrwxrwx 3 root root 4096 2023-09-27 03:41 mini_httpd
ls -l /direct-usb
lrwxrwxrwx 1 root root 11 2023-09-25 12:43 /direct-usb -> /share/1000
drwxrwxrwx 6 root root 4096 2018-01-01 20:36 fvdw
drwxr-xr-x 3 root root 4096 2023-09-27 18:53 fvdw
drwxrwxrwx 14 root root 4096 2023-09-27 23:25 mini-httpd
drwxrwxrwx 3 root root 4096 2023-09-27 03:41 mini_httpd
mv /direct-usb/fvdw /share/1000/fvdw/fvdw.err
chmod 777 /share/1000/fvdw/fvdw.err
mv /direct-usb/mini_httpd /share/1000/mini_httpd/mini_httpd.err
unlink /direct-usb/1000
ls -l /direct-usb
rmdir /direct-usb
ln -s /share/1000 /direct-usb
ls -l /direct-usb
lrwxrwxrwx 1 root root 11 2023-09-dd hh:mm /direct-usb -> /share/1000
#!/bin/sh
if [ -f "/etc/mini_httpd/mini_httpd.conf" ]
then
unlink /var/run/mini_httpd.pid
/usr/sbin/mini_httpd -i /var/run/mini_httpd.pid -C /etc/mini_httpd/mini_httpd.conf -l /var/log/mini_httpd.log -u nobody
sleep 5
if [ -f "/var/run/mini_httpd.pid" ]
then
echo -e "\t\tStart mini_httpd :\t[ OK ]"
else
echo -e "\t\tStart mini_httpd :\t[ FAIL ]"
exit 1
fi
else
echo -e "\t\tStart mini_httpd :\tMissing conf file"
fi
Jocko wrote:Hi
It is quiet easy.
Create a text file in the location /direct-usb/fvdw/cron-boot (if you use a shell window) or in the share \\nas-name\fvdw\cron-boot if you use file explorer from your laptop. You can name it "mini_httpd-start.sh" for example
So paste these lines(with this code you will be able to see if the server started rightly by reading the /boot.log file)
- Code: Select all
#!/bin/sh
if [ -f "/etc/mini_httpd/mini_httpd.conf" ]
then
unlink /var/run/mini_httpd.pid
/usr/sbin/mini_httpd -i /var/run/mini_httpd.pid -C /etc/mini_httpd/mini_httpd.conf -l /var/log/mini_httpd.log -u nobody
sleep 5
if [ -f "/var/run/mini_httpd.pid" ]
then
echo -e "\t\tStart mini_httpd :\t[ OK ]"
else
echo -e "\t\tStart mini_httpd :\t[ FAIL ]"
exit 1
fi
else
echo -e "\t\tStart mini_httpd :\tMissing conf file"
fi
Note: the firmware will set the right breakline character in your file. So you can create the file from your window laptop without issue
Load the boot job menu, you should see your file in the table. Check its line and click on the button "Save the boot jobs table"
Then to start or not the server, you have to enable or disable the Boot jobs feature (click on the related button)
That 's all
Return to Seagate personal cloud
Users browsing this forum: No registered users and 2 guests