source: branches/cereal/0.22/debian/cereal.preinst @ 1203

Last change on this file since 1203 was 1203, checked in by Daniel Kahn Gillmor, 9 years ago

cereal/0.22: fixing maintainer addresses, updating changelog, removing set -e since it is not associated with the bug at hand.

  • Property svn:executable set to *
File size: 892 bytes
Line 
1#!/bin/sh -e
2
3# preinst script for cereal
4
5# Author: Jamie Rollins <jrollins@finestructure.net> and
6#         Daniel Kahn Gillmor <dkg@fifthhorseman.net>
7# (c) 2007
8
9# make new sessions dir and move all old sessions into it
10if [ -d /var/lib/cereal/ -a ! -d /var/lib/cereal/sessions ] ; then
11    echo "moving sessions to new session directory /var/lib/cereal/sessions/..."
12
13    # find all active sessions
14    SESSIONS=$(cereal list | cut -d ' ' -f 2)
15
16    mkdir -p /var/lib/cereal/sessions
17
18    for SESSION in $SESSIONS ; do
19        echo "moving '$SESSION'..."
20        mv /var/lib/cereal/"$SESSION" /var/lib/cereal/sessions/"$SESSION"
21        if [ -L "/var/service/cereal.$SESSION" ] ; then
22            ln -sfn "/var/lib/cereal/sessions/$SESSION" "/var/service/cereal.$SESSION"
23        fi
24    done
25fi
26
27# dh_installdeb will replace this with shell code automatically
28# generated by other debhelper scripts.
29
30#DEBHELPER#
31
32exit 0
Note: See TracBrowser for help on using the repository browser.