| 1 |
#!/bin/sh |
| 2 |
|
| 3 |
# apt-dater - terminal-based remote package update manager |
| 4 |
# |
| 5 |
# Authors: |
| 6 |
# Thomas Liske <[email protected]> |
| 7 |
# |
| 8 |
# Copyright Holder: |
| 9 |
# 2010-2014 (C) IBH IT-Service GmbH [https://www.ibh.de/apt-dater/] |
| 10 |
# |
| 11 |
# License: |
| 12 |
# This program is free software; you can redistribute it and/or modify |
| 13 |
# it under the terms of the GNU General Public License as published by |
| 14 |
# the Free Software Foundation; either version 2 of the License, or |
| 15 |
# (at your option) any later version. |
| 16 |
# |
| 17 |
# This program is distributed in the hope that it will be useful, |
| 18 |
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 19 |
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 20 |
# GNU General Public License for more details. |
| 21 |
# |
| 22 |
# You should have received a copy of the GNU General Public License |
| 23 |
# along with this package; if not, write to the Free Software |
| 24 |
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA |
| 25 |
# |
| 26 |
|
| 27 |
# Tries to get the path where screen stores it's sockets. |
| 28 |
|
| 29 |
screen=${1:-/usr/bin/screen} |
| 30 |
|
| 31 |
if [ -x "$screen" ]; then |
| 32 |
LANG=C $screen -list | perl -ne 'print "$2\n" if(/^\S+ Sockets? (found )?in (\/.+)\/[^\/]+\.$/);' |
| 33 |
fi |