Commit 30f7d8e2 authored by vysheng's avatar vysheng

Merge pull request #286 from stillru/master

Upstart daemon in debian pakage
parents 6132516d fc16f25e
...@@ -12,3 +12,8 @@ objs/ ...@@ -12,3 +12,8 @@ objs/
dep/ dep/
auto/ auto/
libs/ libs/
debian/telegram-cli.[a-z]
debian/files
debian/telegram-cli/*
debian/telegram-cli.debhelper.log
debian/telegram-cli.substvars
\ No newline at end of file
telegram-cli (1.0.6-1) unstable; urgency=low
* Upstream update version
* Inpliment -e option
-- Steve Illichevsky <still.ru@gmail.com> Sat, 11 Oct 2014 08:47:07 +0400
telegram-cli (1.0.5.1-1) unstable; urgency=low telegram-cli (1.0.5.1-1) unstable; urgency=low
* Initial release * Initial release
-- Steve Illichevsky <still.ru@gmail.com> Wed, 01 Oct 2014 21:06:28 +0400 -- Steve Illichevsky <still.ru@gmail.com> Sun, 05 Oct 2014 09:37:06 +0400
...@@ -3,14 +3,15 @@ Section: net ...@@ -3,14 +3,15 @@ Section: net
Priority: extra Priority: extra
Maintainer: Steve Illichevsky <still.ru@gmail.com> Maintainer: Steve Illichevsky <still.ru@gmail.com>
Build-Depends: debhelper (>= 8.0.0), Build-Depends: debhelper (>= 8.0.0),
autotools-dev, autotools-dev,
autoconf-archive, autoconf-archive,
libreadline-dev, libreadline-dev,
libconfig-dev, libconfig-dev,
libssl-dev, libssl-dev,
lua5.1, lua5.1,
liblua5.1-dev liblua5.1-dev,
Standards-Version: 3.9.2 lua-lgi
Standards-Version: 3.9.5
Homepage: https://github.com/vysheng/tg Homepage: https://github.com/vysheng/tg
Vcs-Git: git://github.com/vysheng/tg.git Vcs-Git: git://github.com/vysheng/tg.git
Vcs-Browser: https://github.com/vysheng/tg Vcs-Browser: https://github.com/vysheng/tg
...@@ -33,4 +34,4 @@ Description: Command-line interface for Telegram messenger ...@@ -33,4 +34,4 @@ Description: Command-line interface for Telegram messenger
* Group chat: create and manage groups. * Group chat: create and manage groups.
* Secret chat: secured and encrypted conversations. * Secret chat: secured and encrypted conversations.
* Contact management: add/edit/remove contacts. * Contact management: add/edit/remove contacts.
* Multimedia support: send/load photos and videos. * Multimedia support: send/load photos and videos.
\ No newline at end of file
telegram-cli_1.0.5.1-1_i386.deb net extra
bin/telegram-cli usr/bin bin/telegram-cli usr/bin
bin/tlc usr/bin
server.pub etc/telegram-cli server.pub etc/telegram-cli
#bin/telegram-cli usr/share/telegram-daemon/bin
#start-telegram-daemon /usr/share/telegram-daemon/bin
test.lua var/lib/telegram-cli/
#telegram-daemon etc/init.d
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
# This special exception was added by Craig Small in version 0.37 of dh-make. # This special exception was added by Craig Small in version 0.37 of dh-make.
# Uncomment this to turn on verbose mode. # Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1 export DH_VERBOSE=1
VERSION=$(shell dpkg-parsechangelog | sed -n 's/^Version: //p' | cut -f1 -d'-') VERSION=$(shell dpkg-parsechangelog | sed -n 's/^Version: //p' | cut -f1 -d'-')
PACKAGE_NAME=$(shell dpkg-parsechangelog | sed -n 's/^Source: //p') PACKAGE_NAME=$(shell dpkg-parsechangelog | sed -n 's/^Source: //p')
...@@ -20,4 +20,4 @@ build-orig: ...@@ -20,4 +20,4 @@ build-orig:
| ( cd $(PACKAGE_NAME)-$(VERSION) && tar xf - ) | ( cd $(PACKAGE_NAME)-$(VERSION) && tar xf - )
tar -cf ../$(PACKAGE_NAME)_$(VERSION).orig.tar $(PACKAGE_NAME)-$(VERSION) tar -cf ../$(PACKAGE_NAME)_$(VERSION).orig.tar $(PACKAGE_NAME)-$(VERSION)
$(RM) -r $(PACKAGE_NAME)-$(VERSION) $(RM) -r $(PACKAGE_NAME)-$(VERSION)
xz ../$(PACKAGE_NAME)_$(VERSION).orig.tar xz ../$(PACKAGE_NAME)_$(VERSION).orig.tar
\ No newline at end of file
/var/lib/telegram-cli/*.log {
daily
missingok
rotate 31
compress
notifempty
nocreate
}
# Automatically added by dh_installinit
if [ -e "/etc/init/telegram-cli.conf" ]; then
invoke-rc.d telegram-cli start || exit $?
fi
# End automatically added section
# Automatically added by dh_installinit
update-rc.d -f telegram-cli remove >/dev/null || exit $?
# End automatically added section
adduser --system --home /var/lib/telegram-cli --gecos "Telegram Daemon User" --group telegramd
\ No newline at end of file
# Automatically added by dh_installinit
if [ "$1" = install ] || [ "$1" = upgrade ]; then
if [ -e "/etc/init.d/telegram-cli" ] && [ ! -L "/etc/init.d/telegram-cli" ]; then
if [ "`md5sum \"/etc/init.d/telegram-cli\" | sed -e \"s/ .*//\"`" != \
"`dpkg-query -W -f='${Conffiles}' telegram-cli | sed -n -e \"\\\\' /etc/init.d/telegram-cli '{s/ obsolete$//;s/.* //p}\"`" ]
then
echo "Obsolete conffile /etc/init.d/telegram-cli has been modified by you, renaming to .dpkg-bak"
mv -f "/etc/init.d/telegram-cli" "/etc/init.d/telegram-cli.dpkg-bak"
else
rm -f "/etc/init.d/telegram-cli"
fi
fi
fi
# End automatically added section
# Automatically added by dh_installinit
if [ -e "/etc/init/telegram-cli.conf" ]; then
invoke-rc.d telegram-cli stop || exit $?
fi
# End automatically added section
deluser --remove-home telegramd
\ No newline at end of file
# Automatically added by dh_installinit
if [ -e "/etc/init/telegram-cli.conf" ]; then
invoke-rc.d telegram-cli stop || exit $?
fi
# End automatically added section
# Service
setuid telegramd
setgid telegramd
script
exec /usr/bin/telegram-cli -s /var/lib/telegram-cli/test.lua -W -d -C -vvvv -l 0 -L /var/lib/telegram-cli/telegram-cli.log -P 8002
# This example for Daemon wich keep log in his home directory
# This daemon can listen localhost:8002 tcp port
end script
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment