- Notifications
You must be signed in to change notification settings - Fork5
Commitaf96aa9
committed
I wanted to submit some changes to the bundled postgres startup
script for Mac OS X. I added calls to utilize the bundled apacherotatelogs script in the DB startup for log rotation. Also modifiedstartup parameters file to allow using the "SystemStarter" utility tostart/stop/restart postgres with a rotating log file.The script credits David Wheeler, 2002. I wrote him a message aboutthe changes an he suggested I post them here. I explain some of thechanges below.Not sure how to submit the changes. I have 3 files, "PostgreSQL"script, "StartupParameters.plist" file, "pg_startupscript.diff" file.The diff file was run against the original "PostgreSQL" script file.I'll try attaching them to this message. If they get filtered I canresend if needed.Thanks.Ray A.------------------------------------1) Changed the "Provides" parameter in StartupParameters.plist to"PostgreSQL" from "postgres database" simply for ease of typing. Itseems that the SystemStarter utility uses the "Provides" value if youwant to control the script. This way I did not have to enclose it inquotes on commandline. The modified StartupParameters.plist is now anXML document also.2) For the startup script I added 2 user modifiable variables:# do you want to rotate the log files, 1=true 0=falseROTATELOGS=1# logfile rotate in secondsROTATESEC="604800"I also added a non modifiable variable:# The apache log rotation utilityLOGUTIL="/usr/sbin/rotatelogs"I modified the StartService and RestartService functions to executethe new commands if the user wants log rotation.Ray Aspeitia1 parente0bed41 commitaf96aa9
File tree
2 files changed
+71
-23
lines changed- contrib/start-scripts
2 files changed
+71
-23
lines changedLines changed: 38 additions & 10 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1 | 1 |
| |
2 | 2 |
| |
3 | 3 |
| |
4 |
| - | |
| 4 | + | |
5 | 5 |
| |
6 | 6 |
| |
7 | 7 |
| |
| |||
12 | 12 |
| |
13 | 13 |
| |
14 | 14 |
| |
15 |
| - | |
| 15 | + | |
16 | 16 |
| |
17 | 17 |
| |
18 | 18 |
| |
| |||
30 | 30 |
| |
31 | 31 |
| |
32 | 32 |
| |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
33 | 41 |
| |
34 | 42 |
| |
35 | 43 |
| |
36 | 44 |
| |
37 | 45 |
| |
38 |
| - | |
| 46 | + | |
39 | 47 |
| |
40 | 48 |
| |
41 | 49 |
| |
42 | 50 |
| |
43 | 51 |
| |
44 |
| - | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
45 | 62 |
| |
46 |
| - | |
47 |
| - | |
48 | 63 |
| |
49 | 64 |
| |
50 | 65 |
| |
| |||
56 | 71 |
| |
57 | 72 |
| |
58 | 73 |
| |
| 74 | + | |
| 75 | + | |
| 76 | + | |
59 | 77 |
| |
60 | 78 |
| |
61 | 79 |
| |
62 | 80 |
| |
63 |
| - | |
64 |
| - | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
65 | 87 |
| |
66 | 88 |
| |
67 | 89 |
| |
| |||
73 | 95 |
| |
74 | 96 |
| |
75 | 97 |
| |
76 |
| - | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
77 | 105 |
| |
78 |
| - | |
| 106 | + | |
79 | 107 |
| |
80 | 108 |
| |
81 | 109 |
| |
|
Lines changed: 33 additions & 13 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1 |
| - | |
2 |
| - | |
3 |
| - | |
4 |
| - | |
5 |
| - | |
6 |
| - | |
7 |
| - | |
8 |
| - | |
9 |
| - | |
10 |
| - | |
11 |
| - | |
12 |
| - | |
13 |
| - | |
| 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 | + |
0 commit comments
Comments
(0)