Skip to content

Commit

Permalink
Configure and install upstart script
Browse files Browse the repository at this point in the history
  • Loading branch information
Daniel I committed Dec 17, 2014
1 parent 8775f72 commit 3de9588
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,5 +53,9 @@ $ cd $HOME
$ git clone https://github.com/yagop/telegram-bot.git --recursive
$ cd telegram-bot/tg
$ ./configure && make
$ cd .. && ./launch.sh # Will ask you for a phone number & confirmation code.
$ cd ..
$ sed -i "s/yourusername/$(whoami)/g" etc/telegram.conf
$ sed -i "s_telegrambotpath_$(pwd)_g" etc/telegram.conf
$ sudo cp etc/telegram.conf /etc/init/
$ ./launch.sh # Will ask you for a phone number & confirmation code.
```
7 changes: 4 additions & 3 deletions etc/telegram.conf
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
description "Telegram-bot upstart script"

respawn
respawn limit 15 5

start on runlevel [2345]
stop on shutdown

script
exec su -s /bin/sh -c /home/yperez/develop/telegram-bot/launch.sh yperez
end script
setuid yourusername
exec /bin/sh telegrambotpath/launch.sh

0 comments on commit 3de9588

Please sign in to comment.