Appendix B : Starting automatically

edit

This manual contains the description about how to make the applications start automatically when the operating system is starting.

Currently, when a computer is rebooted, the applications has to be started manually. This descripes how to make the operating systems start the applications during startup.

Linux

Log in as administrator. Create following script in '/etc/init.d/' (the name of the script will be refered to as netarkiv):

# chkconfig: 345 80 20
# description: netarkiv

[ -x /home/USERNAME/ENV_NAME/conf/startall.sh ]  || exit 0
case $1 in
    start)
        su - netarkiv -c 'ENV_NAME/conf/startall.sh'
        ;;
    stop)
        su - netarkiv -c 'ENV_NAME/conf/killall.sh'
        ;;
    *)
        echo "Usage: $0 { start | stop }"
        exit 1
esac

Where USERNAME is the name of the user for the installation, and ENV_NAME is the environment name for NetarchiveSuite (defined in the configuration file).

The following command has to be run for the netarkiv script to be run during start-up and shut-down of Linux:

chkconfig --add netarkiv

The script can also be run manually, by the commands:

service netarkiv stop
service netarkiv start

Windows

This is an example of how to make Windows 2003 Server automatically call a script during start-up.

The first thing to do is to create a script for restarting the application. This has to be done, since it might not have closed correctly last time (e.g. power-failure, spontanious reboot, etc.). Therefore the kill scripts has to be run before the applications can be started again.

Create a restart script (refered to as restart.bat) with the following content:

 cmd /c killall.bat
 cmd /c startall.bat

Create the service.

Now the application should automatically start during Windows startup.

Installation Manual 3.8/AppendixB (last edited 2010-08-16 10:24:44 by localhost)