File: setup

package info (click to toggle)
solid-desktop 2.2-3
  • links: PTS
  • area: non-free
  • in suites: potato, slink
  • size: 3,620 kB
  • ctags: 2,830
  • sloc: sh: 290; sql: 80; makefile: 64
file content (132 lines) | stat: -rwxr-xr-x 4,903 bytes parent folder | download
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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
#!/bin/sh
#/*****************************************************************\ 
#** filename	 * setup
#**		 *
#** description  * shell script to ease SOLID installation process
#**		 *
#**		 * Launches solinst to create license and config
#**		 * files. Optionally starts server to create a
#**		 * default database.
#**		 *
#** Copyright 	(C) Solid Information Technology Ltd 1997
#\*****************************************************************/

if [ -d database/default ]; then  
  echo
  echo Starting SOLID Install to create a license file and an initial
  echo configuration into the default database directory ... 
  echo
  bin/solinst -c database/default

  if [ $? -ne 0 ]; then
    echo About to exit from setup script.
    echo
    echo After setting up the SOLID configuration you can enter the
    echo following sequence of commands to finalize setting up SOLID 
    echo DBMS execution environment.
    echo
    echo 1. Start SOLID Server and create the default database:
    echo "      bin/solid -f -c database/default"
    echo
    echo 2. Create some sample tables and users with SQL Editor
    echo "      bin/solsql -c database/default -f ../../samples/sample.sql"
    echo
    echo 3. Stop SOLID Server with Remote Control after taking a backup:
    echo "      bin/solcon -c database/default"
    echo "      > backup"
    echo "      > shutdown"
    echo
    echo 4. To start SOLID Server later on, just omit the -f option:
    echo "     bin/solid -c database/default"
    echo 
    echo For Solid version specific documentation, please view file:
    echo "     relnotes.txt"

  else # default configuration used, we can start server

    echo 
    echo Do you wish to start SOLID Server now? Yes / [No]
    read reply
    if [ -z $reply ]; then
      first_char="N"
    else 
      first_char=`echo $reply | cut -c -1` 
    fi

    if [ $first_char = "Y" -o $first_char = "y" ]; then
      echo 
      echo Creating a new database.
      echo 
      echo Give username for database administrator:
      read username
      echo
      echo Give password for database administrator:
      read password
      echo
      echo Starting SOLID Server as a background daemon...
      bin/solid -c database/default -U $username -P $password
      echo
      echo Next, you may connect to the server with SQL Editor to create 
      echo some sample tables, indices and users with command:
      echo "      bin/solsql -c database/default -f ../../samples/sample.sql"
      echo
      echo If the connection cannot be established, please check from
      echo SOLID message log that the server has already created the
      echo database and started listening for data requests.
      echo "      more database/default/solmsg.out"
      echo
      echo When you wish to stop the server, use Remote Control to
      echo take a backup and shutdown:
      echo "     bin/solcon -c database/default"
      echo "     > backup"
      echo "     > shutdown"
      echo 
      echo To start SOLID Server afterwards, just omit the -f option:
      echo "     bin/solid -c database/default"
      echo 
      echo For Solid version specific documentation, please view file:
      echo "     relnotes.txt"

    else # user did not want to start server now
      
      echo 
      echo When you are ready to start the server, you can execute the
      echo following sequence of commands to finalize setting up SOLID 
      echo DBMS execution environment.
      echo
      echo 1. Start SOLID Server and create the default database:
      echo "      bin/solid -f -c database/default"
      echo
      echo 2. Create some sample tables and users with SQL Editor
      echo "      bin/solsql -c database/default -f ../../samples/sample.sql"
      echo
      echo 3. Stop SOLID Server with Remote Control after taking a backup:
      echo "      bin/solcon -c database/default"
      echo "      > backup"
      echo "      > shutdown"
      echo
      echo 4. To start SOLID Server later on, just omit the -f option:
      echo "     bin/solid -c database/default"
      echo 
      echo For Solid version specific documentation, please view file:
      echo "     relnotes.txt"
    fi
  fi
else
  echo 
  echo Directory structure is different than on standard Solid product
  echo package for UNIX platforms. setup should be started in the 
  echo directory where the product package was uncompressed and
  echo files extracted.
  echo 
  echo In order to setup your Solid installation you need to locate
  echo the SOLID database directory, where SOLID Server is to be 
  echo lauched from. Run SOLID Install program: 
  echo "      solinst -c <solid_db_dir>"
  echo that will create solid.lic and solid.ini files necessary for 
  echo the server to start. solinst requires the files solidlic.txt
  echo and default.lic to exist in the same directory.
  echo
  exit 1
fi
# End of script.