2016-12-04 19:55:52 -06:00
|
|
|
CONFDIR = /usr/local/etc/TheRaven
|
2016-09-27 10:33:41 -05:00
|
|
|
|
2016-12-04 19:55:52 -06:00
|
|
|
compile: clean /usr/bin/mcs /usr/bin/mono clean /bin/bash /usr/bin/mail /usr/bin/wget /usr/local/bin/djinni ./chatbot-support.bash
|
2016-09-27 10:33:41 -05:00
|
|
|
if [ ! -d ../Djinni ]; then git clone -C '..' https://aninix.net/foundation/Djinni; fi
|
|
|
|
git -C ../Djinni pull
|
|
|
|
if [ ! -d ../SharedLibraries ]; then git clone -C '..' https://aninix.net/foundation/SharedLibraries; fi
|
|
|
|
git -C ../SharedLibraries pull
|
2016-12-04 19:55:52 -06:00
|
|
|
mcs -out:raven.mono ../SharedLibraries/CSharp/*.csharp *.csharp Raven.csharp
|
2016-08-04 11:08:14 -05:00
|
|
|
|
|
|
|
clean:
|
2016-12-04 19:55:52 -06:00
|
|
|
for i in raven.mono; do if [ -f $$i ]; then rm $$i; fi; done
|
2016-08-04 11:08:14 -05:00
|
|
|
|
|
|
|
edit:
|
|
|
|
emacs -nw raven.csharp
|
|
|
|
|
2016-09-27 10:33:41 -05:00
|
|
|
test: compile
|
2016-12-04 19:55:52 -06:00
|
|
|
script -c "mono ./raven.mono -c raven-test.conf -v" /tmp/raven-test.log
|
2016-08-04 11:08:14 -05:00
|
|
|
|
|
|
|
check-for-verbosity:
|
|
|
|
grep Console.WriteLine *.csharp | egrep -v 'verbosity|raven.csharp'; echo
|
|
|
|
|
2016-09-27 10:33:41 -05:00
|
|
|
install: compile
|
2016-08-04 11:08:14 -05:00
|
|
|
cp raven.mono /opt/raven.mono
|
2016-09-27 10:33:41 -05:00
|
|
|
if [ ! -d ${CONFDIR} ]; then (mkdir -p /usr/local/etc/TheRaven; cp ./sample-conf/* ${CONFDIR}); fi
|
|
|
|
if ! getent passwd raven; then useradd -M -G git,ircd,api -d ${CONFDIR} raven; fi
|
|
|
|
make checkperm
|
2016-08-04 11:08:14 -05:00
|
|
|
cp ./raven.service /usr/lib/systemd/system/raven.service
|
|
|
|
systemctl daemon-reload
|
|
|
|
systemctl enable raven
|
2016-09-27 10:33:41 -05:00
|
|
|
|
|
|
|
reverse: /usr/lib/systemd/system/raven.service
|
|
|
|
cp /usr/lib/systemd/system/raven.service .
|
|
|
|
|
|
|
|
checkperm: /opt/raven.mono
|
|
|
|
chown -R raven:raven /opt/raven.mono ${CONFDIR}*
|
|
|
|
chmod 0600 /opt/raven.mono ${CONFDIR}*/*
|
|
|
|
chmod 0700 ${CONFDIR}*
|
|
|
|
|