4
Fork 0

Added files to build Debian packages

This commit is contained in:
R3ABM Artem 2016-03-24 09:32:36 +03:00
parent 8d7562cd14
commit bdd35af00c
8 changed files with 88 additions and 0 deletions

13
UpdateLog.sh Normal file
View file

@ -0,0 +1,13 @@
#!/bin/bash
VERSION=(grep -o -E "[0-9]+" Version.h)
DATE=$(date +"%a, %d %b %a %H:%M:%S %z")
echo >> debian/changelog
echo "brandmeister ${VERSION} none; urgency=low" >> debian/changelog
echo >> debian/changelog
echo "* Daily build" >> debian/changelog
echo >> debian/changelog
echo " -- Artem Prilutskiy <cyanide.burnout@gmail.com> ${DATE}" >> debian/changelog
echo >> debian/changelog

1
debian/compat vendored Normal file
View file

@ -0,0 +1 @@
7

1
debian/conffiles vendored Normal file
View file

@ -0,0 +1 @@
/opt/CronosAgent/cronosagent.sh

12
debian/control vendored Normal file
View file

@ -0,0 +1,12 @@
Source: cronosagent
Section: unknown
Priority: extra
Maintainer: Artem Prilutskiy <cyanide.burnout@gmail.com>
Build-Depends:
debhelper (>= 5), libconfig-dev (>= 1.3), libssl-dev
Standards-Version: 3.8.4
Package: cronosagent
Architecture: any
Depends: ${shlibs:Depends}, ${misc:Depends}
Description: CronosAgent for BrandMeister DMR Master Server

2
debian/copyright vendored Normal file
View file

@ -0,0 +1,2 @@
Copyright: (c) 2016 Artem Prilutskiy

35
debian/postinst vendored Executable file
View file

@ -0,0 +1,35 @@
#!/bin/bash
PREFIX=/opt/CronosAgent
grep master /etc/passwd > /dev/null
if [ "$?" == "1" ]
then
addgroup cronos
adduser cronos --system --home $PREFIX --shell /bin/false --disabled-login --disabled-password
fi
ps -eaf | grep root | grep systemd > /dev/null
if [ "$?" == "0" ]
then
ln -s -f $PREFIX/cronosagent.service /etc/systemd/system/multi-user.target.wants/cronosagent.service
systemctl daemon-reload
systemctl start systemd-modules-load
systemctl restart cronosagent
else
ln -s -f $PREFIX/cronosagent-daemon /etc/init.d/cronosagent
update-rc.d cronosagent defaults
service cronosagent restart
if [ -d /etc/monit/conf.d ]
then
ln -s -f $PREFIX/cronosagent-monit /etc/monit/conf.d/cronosagent
service monit restart
fi
fi
exit 0

17
debian/prerm vendored Executable file
View file

@ -0,0 +1,17 @@
#!/bin/bash
if [ -e /etc/init.d/cronosagent ]
then
service cronosagent stop
update-rc.d -f cronosagent remove
rm -f /etc/init.d/cronosagent
fi
if [ -e /etc/systemd/system/cronosagent.service ]
then
systemctl stop cronosagent
rm -f /etc/systemd/system/cronosagent.service
systemctl daemon-reload
fi
exit 0

7
debian/rules vendored Executable file
View file

@ -0,0 +1,7 @@
#!/usr/bin/make -f
#export DH_VERBOSE=1
export DH_OPTIONS
%:
dh $@