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
f34b9bba
Commit
f34b9bba
authored
Apr 27, 1998
by
Bruce Momjian
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Improved version from Claudiu
parent
4fcd0d63
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
8 deletions
+10
-8
contrib/linux/postgres.init
contrib/linux/postgres.init
+10
-8
No files found.
contrib/linux/postgres.init
View file @
f34b9bba
...
@@ -11,6 +11,7 @@
...
@@ -11,6 +11,7 @@
# and then set USE_SYSLOG to "yes" below
# and then set USE_SYSLOG to "yes" below
#
#
#PGBIN="/opt/postgres/current/bin" # not used
#PGBIN="/opt/postgres/current/bin" # not used
PGACCOUNT
=
"postgres"
# the postgres account (you called it something else?)
PGACCOUNT
=
"postgres"
# the postgres account (you called it something else?)
POSTMASTER
=
"postmaster"
# this probably won't change
POSTMASTER
=
"postmaster"
# this probably won't change
...
@@ -18,8 +19,7 @@ USE_SYSLOG="yes" # "yes" to enable syslog, "no" to go to /tmp/postgres.log
...
@@ -18,8 +19,7 @@ USE_SYSLOG="yes" # "yes" to enable syslog, "no" to go to /tmp/postgres.log
FACILITY
=
"local5"
# can assign local0-local7 as the facility for logging
FACILITY
=
"local5"
# can assign local0-local7 as the facility for logging
PGLOGFILE
=
"/tmp/postgres.log"
# only used if syslog is disabled
PGLOGFILE
=
"/tmp/postgres.log"
# only used if syslog is disabled
PGOPTS
=
"-B 256"
PGOPTS
=
"-i -B 2048"
#PGOPTS="-i -B 256" # -i to enable TCP/IP rather than Unix socket
# Source function library.
# Source function library.
.
/etc/rc.d/init.d/functions
.
/etc/rc.d/init.d/functions
...
@@ -45,16 +45,18 @@ case "$1" in
...
@@ -45,16 +45,18 @@ case "$1" in
fi
fi
echo
-n
"Starting postgres: "
echo
-n
"Starting postgres: "
# force full login to get path names
# force full login to get path names
# my postgres runs tcsh so use proper syntax in redirection...
if
[
${
USE_SYSLOG
}
=
"yes"
]
;
then
if
[
${
USE_SYSLOG
}
=
"yes"
]
;
then
su -
${
PGACCOUNT
}
-c
"(
${
POSTMASTER
}
${
PGOPTS
}
|& logger -p
${
FACILITY
}
.notice) &"
>
/dev/null
&
su -
${
PGACCOUNT
}
-c
"(
${
POSTMASTER
}
${
PGOPTS
}
2>&1 | logger -p
${
FACILITY
}
.notice) &"
>
/dev/null 2>&1
&
else
else
su -
${
PGACCOUNT
}
-c
"
${
POSTMASTER
}
${
PGOPTS
}
>>&!
${
PGLOGFILE
}
&"
>
/dev/null
&
su -
${
PGACCOUNT
}
-c
"
${
POSTMASTER
}
${
PGOPTS
}
2>>&1
${
PGLOGFILE
}
&"
>
/dev/null 2>&1
&
fi
fi
sleep
5
sleep
5
pid
=
`
pidof
${
POSTMASTER
}
`
pid
=
`
pidof
${
POSTMASTER
}
`
echo
-n
"
${
POSTMASTER
}
[
$pid
]"
echo
-n
"
${
POSTMASTER
}
[
$pid
]"
sleep
2
# touch /var/lock/subsys/${POSTMASTER}
# touch /var/lock/subsys/${POSTMASTER}
# use the name of the symlink
touch
/var/lock/subsys/postgres
echo
echo
;;
;;
stop
)
stop
)
...
@@ -63,7 +65,7 @@ case "$1" in
...
@@ -63,7 +65,7 @@ case "$1" in
if
[
"
$pid
"
!=
""
]
;
then
if
[
"
$pid
"
!=
""
]
;
then
echo
-n
"
${
POSTMASTER
}
[
$pid
]"
echo
-n
"
${
POSTMASTER
}
[
$pid
]"
kill
-TERM
$pid
kill
-TERM
$pid
sleep
1
sleep
3
fi
fi
echo
echo
;;
;;
...
...
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