Skip to content

Instantly share code, notes, and snippets.


Oliver Hartl ohartl

View GitHub Profile

Keybase proof

I hereby claim:

  • I am ohartl on github.
  • I am ohartl ( on keybase.
  • I have a public key whose fingerprint is CF9F B900 B968 E77D 9DB4 E182 BC0F 18F7 EAB1 1EC9

To claim this, I am signing this object:

ohartl / php-fpm-checkconf
Created Mar 8, 2016
check all php fpm configs
View php-fpm-checkconf
# for php 7.0
[ -x /usr/sbin/php-fpm7.0 ] && /usr/sbin/php-fpm7.0 -t || echo "php 7.0 not found"
# for php 5.*
[ -x /usr/sbin/php5-fpm ] && /usr/sbin/php5-fpm -t || echo "php 5.* not found"
ohartl / create-jailed-sftp-user
Last active Mar 8, 2016
create user that is restricted to sftp only, is jailed (chroot) and can still access certain directories outside his jail.
View create-jailed-sftp-user
# add group
groupadd sftp-fileshare
# add user
mkdir /home/sftp-fileshare-user1
chown root:root /home/sftp-fileshare-user1
chmod 0755 /home/sftp-fileshare-user1
useradd --home /home/sftp-fileshare-user1 --shell /bin/false sftp-fileshare-user1
ohartl / check http status code with curl
Created Mar 31, 2015
check http status code with curl
View check http status code with curl
http_status=`curl -s -I | grep HTTP/1.1 | awk {'print $2'}`
echo $http_status
if [ $http_status -eq 200 ]; then
echo "this is HTTP Status 200"
echo "not 200"