sayem314 / Caddy-Web-Server-Installer

Script to manage Caddy web server
MIT License
210 stars 86 forks source link

Weird issue relating cat and pids #9

Closed Nixtren closed 8 years ago

Nixtren commented 8 years ago
root@debian:~# caddy start
cat: /var/run/caddy/caddy.pid: No such file or directory

  Starting Caddy Web Server...  DONE

root@debian:~# caddy

  Caddy Web Server is NOT running

  Welcome!
  run caddy help  for help

I found this command in the source-code to get Caddy's pid's I guess, here's the output:

root@debian:~# ps aux | grep /opt/caddyserver/caddy | grep -v grep | awk '{ print $2 }' | sort -
20014
20017

The script doesn't detect Caddy is running, but the pidfile exists and that command returns two pids. And btw, shouldn't the cat error message be silenced/omitted?

I'm running Debian 8 (Jessie). Anyone with the same problem?

root@debian:~# uname -a
Linux debian 2.6.32-042stab113.17 #1 SMP Wed Feb 10 18:31:00 MSK 2016 x86_64 GNU/Linux
sayem314 commented 8 years ago

Should be fixed now! run this wget -q https://raw.githubusercontent.com/sayem314/Caddy-Web-Server-Installer/master/caddy.sh -O - -o /dev/null|bash

Nixtren commented 8 years ago

Thanks @sayem314, it's fixed :)

The cat error still shows up, but it's not critical:

cat: /var/run/caddy/caddy.pid: No such file or directory