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
0b055d31
Commit
0b055d31
authored
May 17, 1997
by
Thomas G. Lockhart
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Linux-specific (RedHat variant) postgres system startup routine.
Initial version.
parent
b072cd4e
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
59 additions
and
0 deletions
+59
-0
contrib/linux/postgres.init
contrib/linux/postgres.init
+59
-0
No files found.
contrib/linux/postgres.init
0 → 100755
View file @
0b055d31
#! /bin/sh
#
# postgres.init Start postgres back end system.
#
# Author: Thomas Lockhart <Thomas.Lockhart@jpl.nasa.gov>
# based on news startup by David Myers
#
# Written for RedHat Linux but should apply to other Linux distributions.
# Assumptions:
# - the postgres user is named "postgres"
# - the postgres user is running csh/tcsh
#
# Source function library.
.
/etc/rc.d/init.d/functions
# Get config.
.
/etc/sysconfig/network
# Check that networking is up.
# Pretty much need it for postmaster.
if
[
${
NETWORKING
}
=
"no"
]
then
exit
0
fi
[
-f
/opt/postgres/current/bin/postmaster
]
||
exit
0
# See how we were called.
case
"
$1
"
in
start
)
echo
-n
"Starting postgres service: "
# force full login to get path names and environment variables
# postgres runs tcsh so use proper syntax in redirection
# change this line if another shell syntax is necessary
# su - postgres -c 'postmaster -S' > /dev/null&
su - postgres
-c
'postmaster >>&! /tmp/postmaster.log&'
>
/dev/null&
sleep
5
pid
=
`
pidof postmaster
`
echo
-n
"postmaster [
$pid
]"
# touch /var/lock/subsys/postmaster
echo
;;
stop
)
echo
-n
"Stopping postgres service: "
pid
=
`
pidof postmaster
`
if
[
"
$pid
"
!=
""
]
;
then
echo
-n
"postmaster [
$pid
]"
kill
-TERM
$pid
sleep
1
fi
echo
;;
*
)
echo
"Usage: postgres.init {start|stop}"
exit
1
esac
exit
0
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