Page Menu
Home
DevCentral
Search
Configure Global Search
Log In
Files
F11725079
restart-php-fpm.sh
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
restart-php-fpm.sh
View Options
#!/bin/sh
# -------------------------------------------------------------
# Restart php-fpm
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# Project: Nasqueron
# License: Trivial work, not eligible to copyright
# Source file: roles/webserver-alkane/php/files/restart-php-fpm.sh
# Description: Deploy and restart php-fpm service
# -------------------------------------------------------------
set
-e
# -------------------------------------------------------------
# Ensure user is root
#
# Note: POSIX shells don't always define $UID or $EUID.
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
if
[
"
${
EUID
:-$(
id -u
)
}
"
-ne
0
]
;
then
echo
"This command must be run as root."
>
&
2
exit
1
fi
# -------------------------------------------------------------
# Update through Salt the service if needed & restart php-fpm
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
rm -f /usr/local/etc/rc.d/php_fpm
grep -q auto-generated /usr/local/etc/rc.d/php-fpm
||
salt-call state.apply roles/webserver-alkane/php/service
/usr/local/etc/rc.d/php-fpm restart
File Metadata
Details
Attached
Mime Type
text/x-shellscript
Expires
Thu, Sep 18, 19:04 (4 h, 23 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2991363
Default Alt Text
restart-php-fpm.sh (1 KB)
Attached To
Mode
rOPS Nasqueron Operations
Attached
Detach File
Event Timeline
Log In to Comment