Changes
Jump to navigation
Jump to search
← Older edit
Newer edit →
BASH
(view source)
Revision as of 09:13, 3 April 2017
380 bytes added
,
09:13, 3 April 2017
no edit summary
Line 239:
Line 239:
=== Check if variable is set ===
=== Check if variable is set ===
if [ -z ${var+x} ]; then echo "var is unset"; else echo "var is set to '$var'"; fi
if [ -z ${var+x} ]; then echo "var is unset"; else echo "var is set to '$var'"; fi
+
=== Check command success ===
+
+
<source lang="bash">#!/bin/bash
+
OK="[\033[01;32m OK \033[01;36m]\033[01;00m"
+
FAIL="[\033[01;33m FAIL \033[01;36m]\033[01;00m"
+
+
function check_success {
+
if [ $? -eq 0 ]; then
+
echo -e ${OK}
+
else
+
echo -e ${FAIL}
+
fi
+
}
+
+
echo -en "\033[01;36m Restarting Gunicorn ... "
+
cat CHANGELOG.md &> /dev/null
+
check_success
+
</source>
=== Ubuntu proxy setup ===
=== Ubuntu proxy setup ===
Rafahsolis
Bureaucrats
,
Administrators
2,306
edits
Navigation menu
Personal tools
Not logged in
Talk
Contributions
Create account
Log in
Namespaces
Page
Discussion
Variants
Views
Read
View source
View history
More
Search
Navigation
Main page
Recent changes
Random page
Help about MediaWiki
Tools
Special pages
Printable version