|
Some documents linked from this page may require Adobe Acrobat PDF reader. |
|
D-STAR Gateway SoftwareICOM GatewayCurrently, the software from ICOM is the only available gateway interconnect software for the D-STAR system. Gateway SoftwarePlease obtain your copy of your gateway software from your authorized ICOM dealer. Presently, the standard OS to install the Version 2 Gateway Software (G2) on is CentOS 5.2. You will want to download yourself some installation media (cd's or the dvd) from http://www.centos.org. The installation manual for the G2 software is included on the disk from ICOM. Unfortunately, the English isn't written all that well, so it can be difficult to understand what they are saying. Usually if you refer to the pictures and boxes, you will be successful in getting the software installed. Post InstallationIn order to fix some issues identified with the roll-out of the G2 software, it is necessary to apply a few updates. See http://dsyncg2.dstarusers.org/info/ for further information and instructions. There, you will also find some of the add-on software that is installed on most gateways. When you are ready to register your gateway on the US Trust server, you will need to contact the US Trust Server administration team by sending an email to trust-server-admins@dstarusers.org. Important CommandsThere are some important commands useful for checking status and trouble-shooting problems. These include:
Most of the software keeps log files as it runs, they can be found in /var/log. Use cat or tail to have a look at them. If you want to watch a log file in real time, do a tail -f filename (exit with ctrl-c). Warning... the rest of this page contains modifications of the ICOM D-STAR Gateway Software. You CAN hose you system real quick if you do not know what you are doing. Proceed with caution. If you screw it up, don't blame me! Fix Registration Page Re-directOut of the box, you are supposed to register users on the gateway system at https://my.domain.net/Dstar.do (note the https). This is, of course, a secure web page. Unfortunately, if you just go to the domain name, and forget the Dstar.do, you get an error (Apache tries to do a directory listing because there is no index file, and the permissions won't allow that). To fix this error, and get people to the right place, a simple fix is to create a basic index.html file that re-directs them to the right place. You need the following code: <html> <head> <META HTTP-EQUIV="Refresh" Content="2; URL=Dstar.do"> </head> <body> Forwarding to login page...please wait. </body> </html> Place it in a file called index.html in /opt/products/dstar/apache/securesite. Make sure it is readable by all chmod 644 index.html. Now, when you go to the base URL of the G2 box, you should get re-directed to the login page after a couple of seconds. This is the simplest way to do it. It does not rely on knowing any hostnames or anything else fancy. Pretty it up and do what you like... if you want. Make G2 Email YouAgain, out of the box, there is a "problem" with the G2 software in that there is no way to know if there are new registrations pending approval. One would figure the box would notify someone, as it implies, when a new user registers... but it doesn't. Go get the JavaMail API from Sun. You have to do some clicking to actually get to the file, so download it somewhere conveniently, then transfer it to your G2 box. Go get the JAF API from Sun. Again, you have to do some clicking to actually get to the file, so download it somewhere conveniently, then transfer it to your G2 box. Once you get both those files onto your G2 box, un-zip them. From the JavaMail file, get the mail.jar file and copy it to /opt/products/dstar/tomcat/webapps/D-STAR/WEB-INF/lib, and from the JAF file, get the activation.jar file and copy it too into the same place. These files enable you to actually be able to send email from Tomcat/Java. Now, go to /opt/products/dstar/tomcat/webapps/D-STAR/WEB-INF/pages/register and you will see a couple of files. Back up the Complete.jsp file (cp Complete.jsp Complete.jsp.old is a good idea). Open Complete.jsp in a text editor. At the very top of the file, paste in the following three lines above everything else: <%@page import="java.util.*"%> <%@page import="javax.mail.*"%> <%@page import="javax.mail.internet.*"%> Next, just above the <html:html> tag, paste the following:
<%
Properties props = new Properties();
props.put("mail.smtp.host", "localhost");
Session s = Session.getInstance(props, null);
MimeMessage message = new MimeMessage(s);
InternetAddress from = new InternetAddress("dstar@localhost");
message.setFrom(from);
InternetAddress to = new InternetAddress("dstar@localhost");
message.addRecipient(Message.RecipientType.TO, to);
message.setSubject("New D-STAR Registration");
message.setText("A new user has registered and is awaiting approval!");
Transport.send(message);
%>
Now, what will happen is that when new users register, they have to click "OK" in the "Are you sure?" box. If the registration passes without errors, the Complete.jsp file gets called. The code that you just pasted gets run when the page is called. It sends an email to "dstar@localhost", which is the dstar user on the G2 machine to let them know that someone has just registered and is pending approval. Of course, you probably aren't going to check that mail, so you will want it to be forwarded somewhere else more convenient (or even to multiple admins). That's easy, as the G2 box should have Sendmail running on it. The reason we choose the dstar user and not root to send the notification to, is that root also gets mails from logwatch and other stuff that is running. Open /etc/aliases in a text editor, go way down to the bottom of the file, and paste in the following: # Who should we send D-STAR notifications to dstar: you@your-isp.net Save the file, then run the command newaliases to update the database. Finally, restart Sendmail with a service sendmail restart. That's it, now when new registrations arrive, you will get an email notification! If you want the easy way to do this, download this file to your G2 machine, and run the following commands: tar -xzf email_mod.tar.gz cd ./email_mod sh ./email_mod You can download this file directly to your G2 box with the command: curl -O http://www.dstar.ca/scripts/email_mod.tar.gz |