2 Commits

Author SHA1 Message Date
d5b44bb523 Including dependency 2024-04-08 00:04:55 -05:00
d2fea2be16 Updates for ravensend 2024-04-08 00:03:30 -05:00
4 changed files with 10 additions and 12 deletions

View File

@@ -19,15 +19,15 @@ install: compile
mkdir -p ${pkgdir}/usr/local/etc/ mkdir -p ${pkgdir}/usr/local/etc/
install -m 0640 -o raven -g raven ./ravensend-daemon.yml ${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 reverse: ${pkgdir}/usr/lib/systemd/system/ravensend-daemon.service
cp ${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 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 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 chown raven: ${pkgdir}/usr/lib/systemd/system/ravensend-daemon.service
chmod 0644 ${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

View File

@@ -1,5 +1,5 @@
# Maintainer: DarkFeather <ircs://aninix.net:6697/darkfeather> # Maintainer: DarkFeather <ircs://aninix.net:6697/darkfeather>
depends=('python' 'python-yaml' 'python-flask' 'bash' 'nmap>=7.91-1') depends=('python' 'python-yaml' 'python-flask' 'bash' 'nmap>=7.91-1' 'TheRaven')
makedepends=('make>=4.2' 'Uniglot') makedepends=('make>=4.2' 'Uniglot')
checkdepends=() checkdepends=()
optdepends=() optdepends=()
@@ -17,7 +17,7 @@ license=('custom')
groups=() groups=()
provides=("${pkgname}") provides=("${pkgname}")
conflicts=() conflicts=()
replaces=("${pkgname,,}", "aninix-${pkgname,,}") replaces=("${pkgname,,}" "aninix-${pkgname,,}")
backup=() backup=()
options=() options=()
install= install=

View File

@@ -22,15 +22,13 @@ configvars = []
def hello(): def hello():
data = request.json 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: with socket.socket(socket.AF_INET, socket.SOCK_STREAM) as s:
try: try:
s.connect((configvars["server"],int(configvars["port"]))) s.connect((configvars["server"],int(configvars["port"])))
s.settimeout(1) s.settimeout(1)
mesg = configvars["password"] + ' #' + configvars["channel"] + ' ' + data["event"]["message"] + ' at ' + data["event"]["timestamp"] mesg = configvars["password"] + ' #' + configvars["channel"] + ' ' + notification
print(mesg)
s.send(mesg.encode()) s.send(mesg.encode())
print('Sent to TheRaven')
except: except:
print('Could not send to TheRaven') print('Could not send to TheRaven')
return data return data

View File

@@ -1,6 +1,6 @@
[Unit] [Unit]
Description=AniNIX/ravensend Daemon Description=AniNIX/ravensend Daemon
After=network.target After=network.target raven.service
[Service] [Service]
ExecStart=/usr/local/bin/ravensend-daemon ExecStart=/usr/local/bin/ravensend-daemon