aboutsummaryrefslogtreecommitdiff
path: root/src/Main.java
blob: 783ebe0f642277658b67ce2b2dcba8e484d4d337 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
import org.traccar.Server;
import org.traccar.helper.Log;

public class Main {

    public static void main(String[] args) throws Exception {

        final Server service = new Server();
		String[] argss = new String[1];
		argss[0] = "setup\\windows\\windows.cfg";
        service.init(argss);

        Log.info("starting server...");
        
        
        service.start();
        
        
        
        

        // Shutdown server properly
        Runtime.getRuntime().addShutdownHook(new Thread() {
            @Override
            public void run() {
                Log.info("shutting down server...");
                service.stop();
            }
        });

    }
}