Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:Morloth
TinyProxy
debian.postinst
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File debian.postinst of Package TinyProxy
#!/bin/sh # postinst script for netpolicetiny # # see: dh_installdeb(1) set -e # Move a conffile without triggering a dpkg question mv_conffile() { local OLDCONFFILE="$1" local NEWCONFFILE="$2" [ -e "$OLDCONFFILE" ] || return 0 echo "Preserving user changes to $NEWCONFFILE ..." mv -f "$NEWCONFFILE" "$NEWCONFFILE".dpkg-new mv -f "$OLDCONFFILE" "$NEWCONFFILE" rmdir --ignore-fail-on-non-empty /etc/netpolicetiny } case "$1" in configure) if dpkg --compare-versions "$2" le "1.6.3-3.3"; then mv_conffile "/etc/netpolicetiny/netpolicetiny.conf" "/etc/netpolicetiny.conf" fi esac ### # Insert iptables into init script ## IPT=`whereis iptables| awk '{ print $2 }'` #sed -i "s@IPT=@IPT=${IPT}@" "/etc/init.d/netpolicetiny" sed -i "s@IPT=[A-Za-z\/.]*@IPT=${IPT}@" "/etc/init.d/netpolicetiny" ## # Insert allow network address in conffile ## ADD=`ifconfig |grep "inet addr:"|awk '{ print $2 }'| cut -d ':' -f 2` for x in $ADD do echo "Allow $x" >> "/etc/netpolicetiny.conf" done #DEBHELPER#
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor