

The sleep script will kill the existing daemon. The wakeup script will kill the existing bavarde daemon, if any, and start a fresh one. Then I created a ~/.wakeup and a ~/.sleep file. To have launchd start sleepwatcher now and restart at login: These are the examples provided by the author. Ignore information about installing the binary and man page,īut read information regarding setup of the launchd files which => Pouring sleepwatcher-2.2.1.įor SleepWatcher to work, you will need to read the following: Instead I'm using a little package named sleepwatcher, available through homebrew. Googling for a Python module didn't get me anywhere (I found some gist that required to use pyobjc. The downside is that if a message is received while I'm away I won't know about it, unless I add something in the protocol to 'mark' messages as read somehow. However I wasn't sure on how the daemon would work when my laptop goes to sleep it sounds safer to restart it when the computer wake up, and stop it when it goes to sleep. This also thanks to a nice python module that does the hard work for you. To get those notification, you need to run a daemon (`bavarde daemon`) which will fork twice and be dettached from your terminal. It is the little popup that shows up in the right hand side. Those are provided through a python module named ().
Sleepwatcher github manual#
There is more automation but the manual mode will just give you a certificate available for 3 months I believe.Ĭobra, which is a websocket server, is running behind nginx which handles the TLS encryption. The way it works is that you need to store a file somewhere on a path accessible by an http server (nginx in my case), and a remote server will try to fetch it to make sure you really own a host. I configured TLS properly for the first time on a server of mine. $ cobra health -endpoint wss:// -rolesecret ccc02DE4Ed8CAB9aEfC8De3e13BfBE5E -rolename pubsub -appkey _pubsub :( Here are some () to follow to secure a server.Ĭobra is a realtime messaging server using Python3, WebSockets and Redis. and got a notification from the Linode support that my machine had been used for port scanning. I picked Alpine Linux 3.11 as the distro.ĭont forget to harden your SSH access after setting up your machine as one of the Linode folk said, the internet is a wild place.

Now it is running 'old school' on a Linode micro box, which is plenty enough for now. So I abandonned it for multiple months, but then was motivated enough to bring it back. Running on GCP turned out to be a bit overkill for a hobby chat, and not as cheap as I wished. It ran on GCP (google cloud platform), then Openshift, but I could not figure out the reverse proxy on openshift, so I was still using GCP, only to proxy to Openshift, pretty silly. For the longuest time the server hosting the cobra server was down. The bavarde chat client, coming with () got some improvements.įirst thing, it works.
