r.ip #7
21
Makefile
21
Makefile
@ -1,4 +1,6 @@
|
|||||||
CONFDIR = ${pkgdir}/usr/local/etc/TheRaven
|
CONFDIR = ${pkgdir}/usr/local/etc/TheRaven
|
||||||
|
INSTALLDIR = ${pkgdir}/opt/aninix/TheRaven
|
||||||
|
SCRIPTS != ls -1 *.bash
|
||||||
|
|
||||||
compile: clean ./chatbot-support.bash ./math-support.bash
|
compile: clean ./chatbot-support.bash ./math-support.bash
|
||||||
(mcs -out:raven.mono /opt/aninix/Uniglot/CSharp/*.csharp *.csharp Raven.csharp 2>&1 | grep -v CS2002); printf ""
|
(mcs -out:raven.mono /opt/aninix/Uniglot/CSharp/*.csharp *.csharp Raven.csharp 2>&1 | grep -v CS2002); printf ""
|
||||||
@ -10,8 +12,9 @@ test: compile
|
|||||||
cd ./sample-confs; mono ../raven.mono -c sample.conf -v -h
|
cd ./sample-confs; mono ../raven.mono -c sample.conf -v -h
|
||||||
|
|
||||||
install: compile
|
install: compile
|
||||||
mkdir -p ${pkgdir}/opt
|
source $$PWD/installscript && pre_install || true
|
||||||
cp raven.mono ${pkgdir}/opt/raven.mono
|
install -o raven -g raven -m 0750 -d ${INSTALLDIR}
|
||||||
|
for script in ${SCRIPTS} raven.mono; do install -o raven -g raven -m 0640 $$script ${INSTALLDIR}; done
|
||||||
if [ ! -d ${CONFDIR} ]; then mkdir -p ${CONFDIR}; cp sample-confs/* ${CONFDIR}; fi
|
if [ ! -d ${CONFDIR} ]; then mkdir -p ${CONFDIR}; cp sample-confs/* ${CONFDIR}; fi
|
||||||
# Hook to deprivilege bot
|
# Hook to deprivilege bot
|
||||||
make checkperm
|
make checkperm
|
||||||
@ -19,14 +22,14 @@ install: compile
|
|||||||
mkdir -p ${pkgdir}/usr/lib/systemd/system/
|
mkdir -p ${pkgdir}/usr/lib/systemd/system/
|
||||||
cp ./raven.service ${pkgdir}/usr/lib/systemd/system/raven.service
|
cp ./raven.service ${pkgdir}/usr/lib/systemd/system/raven.service
|
||||||
|
|
||||||
reverse: ${pkgdir}/usr/lib/systemd/system/raven.service
|
reverse: /usr/lib/systemd/system/raven.service /usr/local/etc/TheRaven
|
||||||
cp ${pkgdir}/usr/lib/systemd/system/raven.service .
|
cp /usr/lib/systemd/system/raven.service .
|
||||||
|
cp ${INSTALLDIR}/*.bash .
|
||||||
|
|
||||||
checkperm: ${pkgdir}/opt/raven.mono
|
checkperm: ${INSTALLDIR}/raven.mono
|
||||||
if ! id raven; then sudo useradd raven; echo User raven added; fi
|
chown -R raven:raven ${INSTALLDIR} ${CONFDIR}
|
||||||
chown -R raven:raven ${pkgdir}/opt/raven.mono ${CONFDIR}*
|
chmod 0600 ${INSTALLDIR}/* ${CONFDIR}/*
|
||||||
chmod 0600 ${pkgdir}/opt/raven.mono ${CONFDIR}*/*
|
chmod 0700 ${CONFDIR} ${INSTALLDIR}
|
||||||
chmod 0700 ${CONFDIR}*
|
|
||||||
|
|
||||||
diff:
|
diff:
|
||||||
diff ./raven.service ${pkgdir}/usr/lib/systemd/system/raven.service
|
diff ./raven.service ${pkgdir}/usr/lib/systemd/system/raven.service
|
||||||
|
@ -4,7 +4,7 @@ After=network.target
|
|||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
WorkingDirectory=/usr/local/etc/TheRaven
|
WorkingDirectory=/usr/local/etc/TheRaven
|
||||||
ExecStart=/usr/bin/mono /opt/raven.mono -c raven.conf
|
ExecStart=/usr/bin/mono /opt/aninix/TheRaven/raven.mono -c raven.conf
|
||||||
ExecReload=/bin/kill -HUP $MAINPID
|
ExecReload=/bin/kill -HUP $MAINPID
|
||||||
KillMode=process
|
KillMode=process
|
||||||
Restart=always
|
Restart=always
|
||||||
|
Loading…
Reference in New Issue
Block a user