source: sipbmp3/debian/inst/edit-lpd.conf @ 331360d

debianmacno-cupsnodebathenaweb
Last change on this file since 331360d was 331360d, checked in by Jessica B. Hamrick <jhamrick@…>, 15 years ago

Added debconf implementation and clean uninstall, but the actual functionality of sipbmp3 seems to be broken - it will send a zephyr and say it's playing the song, and then say "playback completed sucessfully", but both zephyrs come at the ~same time and there is no sound output.

  • Property mode set to 100755
File size: 1.1 KB
Line 
1#!/bin/sh -e
2
3echo "Editing /etc/lprng/lpd.conf..." >&2
4# add the printcap path to lpd.conf
5if [ -e /etc/lprng/lpd.conf ]; then
6    mv /etc/lprng/lpd.conf /etc/lprng/lpd.conf.bak
7    touch /etc/lprng/lpd.conf   
8
9    while read line; do
10        printcap=$(echo "$line" | grep ^printcap_path= || true)
11        if [ -n "$printcap" ]; then
12            lprngprintcap=$(echo "$line" | grep /etc/lprng/printcap || tre)
13            printcap=$(echo "$line" | grep /etc/printcap || true)
14            if [ ! -n "$lprngprintcap" ] && [ ! -n "$printcap" ]; then
15                echo "#$line" >> /etc/lprng/lpd.conf
16                echo "$line" | sed 's,printcap_path=,printcap_path=/etc/lprng/printcap:\|,' >> /etc/lprng/lpd.conf
17            else
18                echo "$line" >> /etc/lprng/lpd.conf
19            fi
20        else
21            echo "$line" >> /etc/lprng/lpd.conf
22        fi
23    done < /etc/lprng/lpd.conf.bak
24    rm /etc/lprng/lpd.conf.bak
25else
26    touch /etc/lprng/lpd.conf
27    echo "printcap_path=/etc/lprng/printcap" >> /etc/lprng/lpd.conf
28fi
29
30# add lpd_listen_port to lpd.conf
31lpd_listen_port=$(cat /etc/lprng/lpd.conf | grep ^lpd_listen_port=515 || true)
32if [ ! -n "$lpd_listen_port" ]; then
33    echo "lpd_listen_port=515" >> /etc/lprng/lpd.conf
34fi
Note: See TracBrowser for help on using the repository browser.