Updates for ravensend
This commit is contained in:
parent
6663651c0b
commit
d2fea2be16
@ -19,15 +19,15 @@ install: compile
|
||||
mkdir -p ${pkgdir}/usr/local/etc/
|
||||
install -m 0640 -o raven -g raven ./ravensend-daemon.yml ${pkgdir}/usr/local/etc/
|
||||
|
||||
diff:
|
||||
for i in ${LIST}; do diff /usr/local/bin/$$i $$i; done
|
||||
diff ${pkgdir}/usr/lib/systemd/system/ravensend-daemon.service ./ravensend-daemon.service
|
||||
|
||||
reverse: ${pkgdir}/usr/lib/systemd/system/ravensend-daemon.service
|
||||
cp ${pkgdir}/usr/lib/systemd/system/ravensend-daemon.service .
|
||||
for i in ${LIST}; do cp ${pkgdir}/usr/lib/systemd/system/$$i .; done
|
||||
for i in ${LIST}; do cp ${pkgdir}/usr/local/bin/$$i .; done
|
||||
|
||||
checkperm: ${pkgdir}/opt/raven.mono
|
||||
for i in ${LIST}; do chown -R raven: ${pkgdir}/usr/local/bin/$$i; chmod 0755 ${pkgdir}/usr/local/bin/$$i; done
|
||||
chown raven: ${pkgdir}/usr/lib/systemd/system/ravensend-daemon.service
|
||||
chmod 0644 ${pkgdir}/usr/lib/systemd/system/ravensend-daemon.service
|
||||
|
||||
diff:
|
||||
for i in ${LIST}; do diff ${pkgdir}/usr/lib/systemd/system/$$i $$i; done
|
||||
diff ${pkgdir}/usr/lib/systemd/system/ravensend-daemon.service ./ravensend-daemon.service
|
||||
|
@ -22,15 +22,13 @@ configvars = []
|
||||
def hello():
|
||||
|
||||
data = request.json
|
||||
print(data["event"]["message"] + ' at ' + data["event"]["timestamp"])
|
||||
notification = data["event"]["message"] + ' at ' + data["event"]["timestamp"] + ' -- ' + data["event"]["key"]
|
||||
with socket.socket(socket.AF_INET, socket.SOCK_STREAM) as s:
|
||||
try:
|
||||
s.connect((configvars["server"],int(configvars["port"])))
|
||||
s.settimeout(1)
|
||||
mesg = configvars["password"] + ' #' + configvars["channel"] + ' ' + data["event"]["message"] + ' at ' + data["event"]["timestamp"]
|
||||
print(mesg)
|
||||
mesg = configvars["password"] + ' #' + configvars["channel"] + ' ' + notification
|
||||
s.send(mesg.encode())
|
||||
print('Sent to TheRaven')
|
||||
except:
|
||||
print('Could not send to TheRaven')
|
||||
return data
|
||||
|
@ -1,6 +1,6 @@
|
||||
[Unit]
|
||||
Description=AniNIX/ravensend Daemon
|
||||
After=network.target
|
||||
After=network.target raven.service
|
||||
|
||||
[Service]
|
||||
ExecStart=/usr/local/bin/ravensend-daemon
|
||||
|
Loading…
Reference in New Issue
Block a user