Skip to content

Instantly share code, notes, and snippets.

@nhoag
nhoag / sphp.sh
Last active May 7, 2019 19:26 — forked from w00fz/sphp.sh
PHP switcher
#!/bin/bash
# Check if command was run as root.
if [[ $(id -u) -eq 0 ]]; then
echo "The command \"sphp\" should not be executed as root or via sudo directly."
echo "When a service requires root access, you will be prompted for a password as needed."
exit 1
fi
# Usage