Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
Postgres FD Implementation
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Abuhujair Javed
Postgres FD Implementation
Commits
87a94732
Commit
87a94732
authored
May 30, 2007
by
Bruce Momjian
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update /contrib OS/X startup files, and move to a separate OS/X
directory. Mark Cotner and David Fetter
parent
44af16f6
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
21 additions
and
5 deletions
+21
-5
contrib/start-scripts/osx/PostgreSQL
contrib/start-scripts/osx/PostgreSQL
+8
-5
contrib/start-scripts/osx/README
contrib/start-scripts/osx/README
+3
-0
contrib/start-scripts/osx/StartupParameters.plist
contrib/start-scripts/osx/StartupParameters.plist
+0
-0
contrib/start-scripts/osx/install.sh
contrib/start-scripts/osx/install.sh
+10
-0
No files found.
contrib/start-scripts/
PostgreSQL.darwin
→
contrib/start-scripts/
osx/PostgreSQL
View file @
87a94732
...
...
@@ -16,13 +16,13 @@
#
# Next, add this line to the /etc/hostconfig file:
#
# POSTGRESQL
SERVER
=-YES-
# POSTGRESQL=-YES-
#
# The startup bundle will now be ready to go. To prevent this script from
# starting PostgreSQL at system startup, simply change that line in
# /etc/hostconfig back to:
#
# POSTGRESQL
SERVER
=-NO-
# POSTGRESQL=-NO-
#
# For more information on Darwin/Mac OS X startup bundles, see this article:
#
...
...
@@ -66,7 +66,7 @@ ROTATESEC="604800"
################################################################################
# The path that is to be used for the script
PATH
=
/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
PATH
=
/usr/local/
pgsql/bin:/usr/local/
sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
# What to use to start up the postmaster (we do NOT use pg_ctl for this,
# as it adds no value and can cause the postmaster to misrecognize a stale
...
...
@@ -82,8 +82,9 @@ LOGUTIL="/usr/sbin/rotatelogs"
.
/etc/rc.common
StartService
()
{
if
[
"
${
POSTGRESQL
SERVER
:
=-NO-
}
"
=
"-YES-"
]
;
then
if
[
"
${
POSTGRESQL
:
=-NO-
}
"
=
"-YES-"
]
;
then
ConsoleMessage
"Starting PostgreSQL database server"
cd
/Users/postgres
if
[
"
${
ROTATELOGS
}
"
=
"1"
]
;
then
sudo
-u
$PGUSER
sh
-c
"
${
DAEMON
}
-D '
${
PGDATA
}
' |
${
LOGUTIL
}
'
${
PGLOG
}
'
${
ROTATESEC
}
&"
else
...
...
@@ -94,13 +95,15 @@ StartService () {
StopService
()
{
ConsoleMessage
"Stopping PostgreSQL database server"
cd
/Users/postgres
sudo
-u
$PGUSER
$PGCTL
stop
-D
"
$PGDATA
"
-s
-m
fast
}
RestartService
()
{
if
[
"
${
POSTGRESQL
SERVER
:
=-NO-
}
"
=
"-YES-"
]
;
then
if
[
"
${
POSTGRESQL
:
=-NO-
}
"
=
"-YES-"
]
;
then
ConsoleMessage
"Restarting PostgreSQL database server"
# should match StopService:
cd
/Users/postgres
sudo
-u
$PGUSER
$PGCTL
stop
-D
"
$PGDATA
"
-s
-m
fast
# should match StartService:
if
[
"
${
ROTATELOGS
}
"
=
"1"
]
;
then
...
...
contrib/start-scripts/osx/README
0 → 100644
View file @
87a94732
To install execute the following:
sudo /bin/sh ./install.sh
contrib/start-scripts/
StartupParameters.plist.darwin
→
contrib/start-scripts/
osx/StartupParameters.plist
View file @
87a94732
File moved
contrib/start-scripts/osx/install.sh
0 → 100755
View file @
87a94732
sudo
sh
-c
'echo "POSTGRESQL=-YES-" >> /etc/hostconfig'
sudo mkdir
/Library/StartupItems/PostgreSQL
sudo cp
PostgreSQL /Library/StartupItems/PostgreSQL
sudo cp
StartupParameters.plist /Library/StartupItems/PostgreSQL
if
[
-e
/Library/StartupItems/PostgreSQL/PostgreSQL
]
then
echo
"Startup Item Installed Successfully . . . "
echo
"Starting PostgreSQL Server . . . "
SystemStarter restart PostgreSQL
fi
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment