Changes
Jump to navigation
Jump to search
← Older edit
Newer edit →
Add a custom service
(view source)
Revision as of 13:41, 24 May 2014
47 bytes added
,
13:41, 24 May 2014
→Start a boot a custom service
Line 64:
Line 64:
printf "%-50s" "Checking $NAME..."
printf "%-50s" "Checking $NAME..."
if [ -f $PIDFILE ]; then
if [ -f $PIDFILE ]; then
−
PID=$(cat $PIDFILE)
+
PID=$(cat $PIDFILE)
if [ -z "$(ps axf | grep ${PID} | grep -v grep)" ]; then
if [ -z "$(ps axf | grep ${PID} | grep -v grep)" ]; then
−
printf "%s\n" "The process appears to be dead but pidfile still exists"
+
printf "%s\n" "The process appears to be dead but pidfile still exists"
else
else
−
echo "Running, the PID is $PID"
+
echo "Running, the PID is $PID"
fi
fi
−
else
+
else
−
printf "%s\n" "Service not running"
+
printf "%s\n" "Service not running"
fi
fi
}
}
Stephdl
Administrators
5,576
edits
Navigation menu
Personal tools
Log in
Namespaces
Page
Discussion
Variants
Views
Read
View source
View history
More
Search
Koozali SME Server
Main Page
Welcome
Releases
Testimonials
Documentation
SME Server FAQ
Volunteering
Commercial Support
Recent activities
Dashboard
Recent wiki changes
Recent bug changes
Unread Forum posts
Koozali resources
Contribs
How-To's
Forums
Bugzilla
Mailing Lists
Translations
Download
Koozali SME Server wiki
Wiki statistics
Wiki categories
Wiki Help
Koozali Wiki Help
Tools
Special pages
Printable version