{"action":"closed","issue":{"url":"https://api.github.com/repos/mattermost/mattermost-server/issues/10032","repository_url":"https://api.github.com/repos/mattermost/mattermost-server","labels_url":"https://api.github.com/repos/mattermost/mattermost-server/issues/10032/labels{/name}","comments_url":"https://api.github.com/repos/mattermost/mattermost-server/issues/10032/comments","events_url":"https://api.github.com/repos/mattermost/mattermost-server/issues/10032/events","html_url":"https://github.com/mattermost/mattermost-server/issues/10032","id":393669822,"node_id":"MDU6SXNzdWUzOTM2Njk4MjI=","number":10032,"title":"rotate logs with logrotate","user":{"login":"irLinja","id":5281015,"node_id":"MDQ6VXNlcjUyODEwMTU=","avatar_url":"https://avatars3.githubusercontent.com/u/5281015?v=4","gravatar_id":"","url":"https://api.github.com/users/irLinja","html_url":"https://github.com/irLinja","followers_url":"https://api.github.com/users/irLinja/followers","following_url":"https://api.github.com/users/irLinja/following{/other_user}","gists_url":"https://api.github.com/users/irLinja/gists{/gist_id}","starred_url":"https://api.github.com/users/irLinja/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/irLinja/subscriptions","organizations_url":"https://api.github.com/users/irLinja/orgs","repos_url":"https://api.github.com/users/irLinja/repos","events_url":"https://api.github.com/users/irLinja/events{/privacy}","received_events_url":"https://api.github.com/users/irLinja/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-12-22T12:35:05Z","updated_at":"2018-12-22T15:42:48Z","closed_at":"2018-12-22T15:42:48Z","author_association":"NONE","body":"Hi,\r\nI have setup logrotate to rotate old logs of mattermost which is running from a systemd service with below configuration:\r\n```\r\n[Unit]\r\nDescription=Mattermost\r\nAfter=syslog.target network.target postgresql-9.4.service\r\n\r\n[Service]\r\nType=notify\r\nWorkingDirectory=/opt/mattermost\r\nUser=mattermost\r\nExecStart=/opt/mattermost/bin/mattermost\r\nPIDFile=/var/spool/mattermost/pid/master.pid\r\nTimeoutStartSec=3600\r\nLimitNOFILE=49152\r\n\r\n[Install]\r\nWantedBy=multi-user.target\r\n```\r\nand logrotate config as following:\r\n```\r\n/opt/mattermost/logs/mattermost.log {\r\n    create 0644 mattermost mattermost\r\n    su mattermost mattermost\r\n    daily\r\n    rotate 10\r\n    missingok\r\n    notifempty\r\n    compress\r\n    sharedscripts\r\n    postrotate\r\n        /bin/kill -HUP `pidof mattermost 2>/dev/null` 2>/dev/null || true\r\n    endscript\r\n}\r\n\r\n\r\n```\r\nseems like the problem is SIGHUP kills the mattermost process.\r\nis there any signals to tell mattermost process to recreate its log file?\r\nor do I need to add `restart=always` to systemd service to restart the process every time it failes due to log rotation?"}}
{"actor":{"display_login":"jasonblais"}}