|
||
Title: Auto-start Server in Linux Post by jadonr on May 18th, 2012, 12:18pm Great program by the way! I tried USB Redirector as well and I have to say this program is much simpler to use. I've been able to share USB devices and it works fantastic. I need help with creating a daemon script to auto start the USB over Network daemon each time my physical server reboots. I've done a bit of research and figured out that it seems that I need to add the changes to a file in either of the the two folders: /etc/rc2.d/ /etc/init.d/ Is this correct? If so, do I just add the script (see below) I'm currently using to start the USB over Network daemon? sudo /usr/local/bin/ftusbnet/sbin/ftusbnetd Do I just need to add the above line into some file in one of the above directories? I'm sorry for all the questions, and thanks for the help! |
||
Title: Re: Auto-start Server in Linux Post by Serge Frost on May 21st, 2012, 3:59am Greetings, Thank you very much for your approval. It depends on what Linux OS you have but you are on the right way. You need to add several strings to your init-scripts. Start section: ___________________________________________________________________________ -->/usr/local/bin/ftusbnet/sbin/ftusbnetd -- just a way to USB over Network. Without "sudo" or any options. -->"any functions that will note the process ID" ___________________________________________________________________________ End section: _________________________________________________________________________ --> "kill all usbnetfd" or "kill PID" ___________________________________________________________________________ If you wish we can write this script for you but we need detailed information about your OS and your init. files. Thank you.Please do not hesitate to ask if you have any questions. Our support team will be glad to assist you. |
||
Title: Re: Auto-start Server in Linux Post by jadonr on May 21st, 2012, 5:53pm on 05/21/12 at 03:59:48, Serge Frost wrote:
That would be fantastic! Here's the build information for my Linux OS: Linux version 2.6.32-11-pve (root@maui) (gcc version 4.4.5 (Debian 4.4.5-8) ) #1 SMP Wed Apr 11 07:17:05 CEST 2012 What init file do you need and which directory do I find it in? |
||
Title: Re: Auto-start Server in Linux Post by Serge Frost on May 22nd, 2012, 5:23am What exactly Debian? ( cat /etc/lsb-release ) |
||
Title: Re: Auto-start Server in Linux Post by jadonr on May 22nd, 2012, 9:05am on 05/22/12 at 05:23:20, Serge Frost wrote:
This Linux distribution is probably somewhat unique in that it was developed by the Proxmox team. Proxmox is a Server Virtualization software much like ESXi. See here for more info: http://www.proxmox.com/products/proxmox-ve. In any case, when I run the command you supplied, I get the following: root@proxmox:~# cat /etc/lsb-release cat: /etc/lsb-release: No such file or directory I plan on publishing a "How To" guide on the Proxmox forum and advertising your software as a better alternative than USB Redirector. Hopefully we can get this working! ;D |
||
Title: Re: Auto-start Server in Linux Post by jadonr on May 23rd, 2012, 11:36am Ok, I've verified that I need to add the entry to the /etc/init.d/ directory. I assume the modification should be made to the rc.local file. Currently this is what it contains. Any ideas on what I need to add to it? #! /bin/sh ### BEGIN INIT INFO # Provides: rc.local # Required-Start: $remote_fs $syslog $all # Required-Stop: # Default-Start: 2 3 4 5 # Default-Stop: # Short-Description: Run /etc/rc.local if it exist ### END INIT INFO PATH=/sbin:/usr/sbin:/bin:/usr/bin . /lib/init/vars.sh . /lib/lsb/init-functions do_start() { if [ -x /etc/rc.local ]; then [ "$VERBOSE" != no ] && log_begin_msg "Running local boot scripts (/etc/rc.local)" /etc/rc.local ES=$? [ "$VERBOSE" != no ] && log_end_msg $ES return $ES fi } case "$1" in start) do_start ;; restart|reload|force-reload) echo "Error: argument '$1' not supported" >&2 exit 3 ;; stop) ;; *) echo "Usage: $0 start|stop" >&2 exit 3 ;; esac |
||
Title: Re: Auto-start Server in Linux Post by Serge Frost on May 24th, 2012, 1:09am I`m sorry for such long delay. Our developer needed to download the ISO of this OS and to see it with his own eyes. Please check your email. I will send the init-file there. Also here is the code. Just in case. #! /bin/sh ### BEGIN INIT INFO # Provides: ftusbnetd # Required-Start: $syslog $time # Required-Stop: $syslog $time # Default-Start: 3 5 # Default-Stop: 0 1 6 # Short-Description: USB-over-Network Server for Linux # Description: Daemon, that allows to redirect USB devices to the # remote hosts ### END INIT INFO PATH=/bin:/usr/bin:/sbin:/usr/sbin DAEMON=/opt/ftusbnet/sbin/ftusbnetd PIDFILE=/var/run/ftusbnetd.pid test -x $DAEMON || exit 0 . /lib/lsb/init-functions case "$1" in start) log_daemon_msg "Starting ftusbnetd" "ftusbnetd" $DAEMON -d log_end_msg $? ;; stop) log_daemon_msg "Stopping ftusbnetd" "ftusbnetd" killall ftusbnetd 2>&1 > /dev/null log_end_msg $? ;; force-reload|restart) $0 stop $0 start ;; status) if ps ax | grep $DAEMON | grep -v grep 2>&1 > /dev/null ; then echo "Running" exit 0 else echo "Not running" exit 1 fi ;; *) echo "Usage: /etc/init.d/ftusbnetd {start|stop|restart|force-reload|status}" exit 1 ;; esac exit 0 |
||
Title: Re: Auto-start Server in Linux Post by jadonr on May 24th, 2012, 7:25am Wow, talk about going the extra mile. You guys are great! I never got the email attachment because my email service dropped the attachment. I updated my profile with a different email if you want to try sending again. Otherwise, I just copied and pasted the script you provided into a file that I named ftusbnetd without any extension. Then I uploaded it to the etc/init.d/ folder and then I tried to run the command, I get Permission Denied. root@proxmox:~# /etc/init.d/ftusbnetd start -bash: /etc/init.d/ftusbnetd: Permission denied I also navigated directly to the /etc/init.d/ directory and tried it from there. Then I get command not found. root@proxmox:/etc/init.d# ftusbnetd start -bash: ftusbnetd: command not found Do I need to reboot my server to make this work? |
||
Title: Re: Auto-start Server in Linux Post by Serge Frost on May 24th, 2012, 8:55am This command is correct: /etc/init.d/ftusbnetd start And please make it executable: chmod +x /etc/init.d/ftusbnetd |
||
Title: Re: Auto-start Server in Linux Post by jadonr on May 25th, 2012, 9:06am I apologize for my inexperience with Linux. This is pretty much my first exposure to the CLI. Anyway, I created the file using the nano editor. Then I ran the "chmod +x /etc/init.d/ftusbnetd" command. When running the commands below, nothing happened. No errors or success statements. It just advances to the next line. root@proxmox:~# /etc/init.d/ftusbnetd start root@proxmox:~# /etc/init.d/ftusbnetd status root@proxmox:~# When I run the status command on any other daemon's in the "init.d" directory, it says they are running. Is it possible that the ftusbnetd that is located in the "/usr/local/bin/ftusbnet/sbin/ftusbnetd" is somehow releated? If you would like me to email you the file that I created in nano, please pm your email address. |
||
Title: Re: Auto-start Server in Linux Post by Serge Frost on May 25th, 2012, 9:33am Oh, sorry. I forgot to mention that script thinks that file is placed at: /opt/ftusbnet/sbin/ftusbnetd And you have placed it in another folder. You can change the path or you can just move the files. |
||
Title: Re: Auto-start Server in Linux Post by jadonr on May 25th, 2012, 12:48pm Ok, it's working now. So when I get order the license, I can just create a text file and name it ftusbnet.key. Then copy everything from the key you email into that file and drop it into the /etc directory, right? |
||
Title: Re: Auto-start Server in Linux Post by Serge Frost on May 28th, 2012, 3:07am Yes, correctly. By default "ftusbnetd" daemon searches for the license key in the following file "/etc/license.key". You should create this file and paste your license key in it (including the "BEGIN" and "END" lines). Alternatively, you can specify a custom location of the license key file with the help of '-k' option: $ sudo /path/to/ftusbnetd -k /path/to/license.key.file |
||
Title: Re: Auto-start Server in Linux Post by wateremea.it.tsmma on Dec 3rd, 2013, 4:31pm Hi, I also used this script but on my windows clinet I get the message that host is unreachable. Als o I would like to have it automatically connect the USB device. Is this possible? Or do I need to install the license (I have on) first? |
||
Title: Re: Auto-start Server in Linux Post by InnaWhite on Dec 5th, 2013, 1:54pm Dear customer, - please check if the deamon is running - try to launch the deamon under root Concerning your other question. Yes, you can connect devices automatically. Check this link to see how to enable the auto-connection function: http://www.fabulatech.com/usb-over-network-client-help/connecting-devices-auto.html |