-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathINSTALLWEBDEV
94 lines (77 loc) · 2.93 KB
/
INSTALLWEBDEV
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
PROGRAM INSTALLWEBDEV
* Installation of WEBDEV
*$Copyright (c) 2010 TO 2012 to 2008 mike.ryder@pwchest.com, All Rights Reserved
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2, or (at your option)
* any later version.
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* This utility install some stuff
$MODE UV.LOCATE
$CATALOG
EQU F.VOC TO @VOC
EXECUTE 'CREATE-FILE WEBPAGES DIRECTORY' CAPTURING GARBAGE
EXECUTE 'CREATE-FILE CSS DIRECTORY' CAPTURING GARBAGE
OS.EXECUTE 'mkdir datastore'
OS.EXECUTE 'mkdir logfile'
I.VOC = 'WS'
R.VOC = 'PA'
R.VOC<2> = 'sh tail -150 logfile/webpages'
WRITE R.VOC ON F.VOC,I.VOC
I.VOC = 'CLEARLOG'
R.VOC = 'PA'
R.VOC<2> = 'sh echo "cleared" > logfile/webpages'
WRITE R.VOC ON F.VOC,I.VOC
I.VOC = 'ON.ABORT'
R.VOC = 'PA'
R.VOC<2> = 'WEB.ABORT'
WRITE R.VOC ON F.VOC,I.VOC
OPEN 'WEBPAGES' TO F.WEBPAGES ELSE
PRINT 'no WEBPAGES directory found'
STOP
END
I.WEBPAGES = 'index.htm'
R.WEBPAGES = '<!doctype html><html><body>'
R.WEBPAGES<2> = '<h1>QM and the web - It works!</h1>'
R.WEBPAGES<3> = '<p>This is the default web page for this server for RESTful web applications</p>'
R.WEBPAGES<4> = '</body></html>'
WRITE R.WEBPAGES ON F.WEBPAGES,I.WEBPAGES
EXECUTE 'SELECT SOURCE UNLIKE ...PHP'
EXECUTE 'COPY FROM SOURCE TO WEB.BP OVERWRITING NO.QUERY'
EXECUTE 'SELECT WEB.BP UNLIKE I_... AND NE INSTALLWEBDEV'
EXECUTE 'BASIC WEB.BP'
I.VOC = 'PSTART'
R.VOC = 'PA'
R.VOC<2> = 'PTERM CASE NOINVERT'
R.VOC<3> = 'DISPLAY Welcome to WEBDEV central'
WRITE R.VOC ON F.VOC,I.VOC
OS.EXECUTE "chmod -R 777 ."
IF SYSTEM(1016) THEN
PRINT @(-1)
PRINT 'Testing the connection'
PRINT 'You should see the following type of response'
PRINT 'Content-Type: text/html'
PRINT 'Location: http:///qmweb/webapp/index.htm'
PRINT STR('*',40)
OS.EXECUTE 'qm -awebdev -quiet WEBAPP'
PRINT STR('*',40)
PRINT 'Welcome back - it works'
END ELSE
DISPLAY 'At your Linux shell type'
DISPLAY 'qm -awebdev -quiet WEBAPP'
PRINT 'You should see the following type of response'
PRINT 'Content-Type: text/html'
PRINT 'Location: http:///qmweb/webapp/index.htm'
END
PRINT 'WEBDEV is now installed - enjoy!'
PRINT 'You can now logon using the command'
PRINT 'qm -awebdev'
PRINT
PRINT 'Press any key to continue - or P if you cannot find the any key'
IN Q
EXECUTE 'OFF'
*************
END