a guest Apr 26th, 2019 57 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
- #! /bin/sh
- set -e
- set -x
- ulimit -v 4000000
- ulimit -c 2000000
- export BAMF_DESKTOP_FILE_HINT=/var/lib/snapd/desktop/applications/telegram-desktop_telegramdesktop.desktop
- tgid="$(basename $0 .sh)"
- if [ -n "$tgid" ]; then
- if ( ps -ax | grep -v grep | grep 'Telegram' | grep -qF "$workdir" ) ; then
- echo "telegram instance $tgid seems already started"
- test -d "$workdir" || mkdir -p "$workdir"
- wd="-workdir $workdir"
- if ( ps -ax | grep -v grep | grep -qF Telegram ) ; then
- echo "telegram instance seems already started"
- echo "start telegram instance $tgid ..."
- if [ -z "$*" ]; then
- $telegram -noupdate -many $wd &>/dev/null &
- $telegram -noupdate -many $wd $*
RAW Paste Data