Merge pull request #286 from stillru/master
Upstart daemon in debian pakage
This commit is contained in:
commit
30f7d8e202
5
.gitignore
vendored
5
.gitignore
vendored
@ -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
|
11
debian/changelog
vendored
11
debian/changelog
vendored
@ -1,5 +1,12 @@
|
|||||||
|
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
|
||||||
|
2
debian/compat
vendored
2
debian/compat
vendored
@ -1 +1 @@
|
|||||||
8
|
9
|
||||||
|
19
debian/control
vendored
19
debian/control
vendored
@ -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
|
|||||||
* 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.
|
||||||
|
1
debian/files
vendored
1
debian/files
vendored
@ -1 +0,0 @@
|
|||||||
telegram-cli_1.0.5.1-1_i386.deb net extra
|
|
6
debian/install
vendored
6
debian/install
vendored
@ -1,3 +1,7 @@
|
|||||||
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
|
||||||
|
4
debian/rules
vendored
4
debian/rules
vendored
@ -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:
|
|||||||
| ( 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
|
||||||
|
8
debian/telegram-cli.logrotate
vendored
Normal file
8
debian/telegram-cli.logrotate
vendored
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
/var/lib/telegram-cli/*.log {
|
||||||
|
daily
|
||||||
|
missingok
|
||||||
|
rotate 31
|
||||||
|
compress
|
||||||
|
notifempty
|
||||||
|
nocreate
|
||||||
|
}
|
8
debian/telegram-cli.postinst.debhelper
vendored
Normal file
8
debian/telegram-cli.postinst.debhelper
vendored
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
# 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
|
1
debian/telegram-cli.preinst
vendored
Normal file
1
debian/telegram-cli.preinst
vendored
Normal file
@ -0,0 +1 @@
|
|||||||
|
adduser --system --home /var/lib/telegram-cli --gecos "Telegram Daemon User" --group telegramd
|
14
debian/telegram-cli.preinst.debhelper
vendored
Normal file
14
debian/telegram-cli.preinst.debhelper
vendored
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
# 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
|
7
debian/telegram-cli.prerm
vendored
Normal file
7
debian/telegram-cli.prerm
vendored
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
# 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
|
5
debian/telegram-cli.prerm.debhelper
vendored
Normal file
5
debian/telegram-cli.prerm.debhelper
vendored
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
# 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
|
10
debian/telegram-cli.upstart
vendored
Normal file
10
debian/telegram-cli.upstart
vendored
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
# 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
|
Loading…
x
Reference in New Issue
Block a user