Add preinst and postrm for daemon mode
Generate config
This commit is contained in:
parent
0917afe134
commit
f159bd954a
3
debian/install
vendored
3
debian/install
vendored
@ -1,2 +1,5 @@
|
|||||||
bin/telegram-cli usr/bin
|
bin/telegram-cli usr/bin
|
||||||
|
bin/telegram-cli usr/share/telegram-daemon/bin
|
||||||
|
start-telegram-daemon /usr/share/telegram-daemon/bin
|
||||||
|
test.lua /var/lib/telegram-daemon/
|
||||||
server.pub etc/telegram-cli
|
server.pub etc/telegram-cli
|
4
debian/postrm
vendored
Normal file
4
debian/postrm
vendored
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
deluser telegramd
|
||||||
|
rm -r /etc/telegram-daemon/
|
||||||
|
rm -r /var/log/telegram-daemon/
|
18
debian/preinst
vendored
Normal file
18
debian/preinst
vendored
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
adduser --system --home /var/lib/telegram-daemon/ telegramd
|
||||||
|
usermod -c "Telegram Daemon" telegramd
|
||||||
|
usermod -d "/var/lib/telegram-daemon/" telegramd
|
||||||
|
usermod -g "telegramd" telegramd
|
||||||
|
usermod -s "/bin/false" telegramd
|
||||||
|
|
||||||
|
mkdir /etc/telegram-daemon/
|
||||||
|
mkdir /var/log/telegram-daemon/
|
||||||
|
touch /etc/telegram-daemon/telegram-daemon.achat.conf
|
||||||
|
echo "execute telegram-cli" > /etc/telegram-daemon/telegram-daemon.achat.conf
|
||||||
|
echo "-d" >> /etc/telegram-daemon/telegram-daemon.achat.conf
|
||||||
|
echo "-vvvv" >> /etc/telegram-daemon/telegram-daemon.achat.conf
|
||||||
|
echo "-E" >> /etc/telegram-daemon/telegram-daemon.achat.conf
|
||||||
|
echo "-R" >> /etc/telegram-daemon/telegram-daemon.achat.conf
|
||||||
|
echo "-D" >> /etc/telegram-daemon/telegram-daemon.achat.conf
|
||||||
|
echo "-C" >> /etc/telegram-daemon/telegram-daemon.achat.conf
|
||||||
|
echo "-P 2391" >> /etc/telegram-daemon/telegram-daemon.achat.conf
|
Loading…
x
Reference in New Issue
Block a user