Files
shadowsocks-libev/debian/shadowsocks-libev.postinst
T
Roger Shimizu 86b3c3a245 Sync debian/ folder with version 2.4.7+20160630+ds-2 (#710)
Changes:
 - Add license of manpages to copyright
 - Change way to handle config file (config.json)
 - Add lintian-overrides
 - Rename/Update docs and install file
2016-07-10 08:58:58 -05:00

26 lines
459 B
Bash
Executable File

#!/bin/sh
set -e
case "$1" in
configure|reconfigure)
if [ ! -f /etc/shadowsocks-libev/config.json ]; then
passwd=$(apg -n 1 -M ncl)
mkdir -p /etc/shadowsocks-libev
sed "s/barfoo!/$passwd/" /usr/share/shadowsocks-libev/config.json \
> /etc/shadowsocks-libev/config.json
fi
;;
abort-upgrade|abort-remove|abort-deconfigure)
exit 0
;;
*)
echo "postinst called with unknown argument \`$1'" >&2
exit 0
;;
esac
#DEBHELPER#
exit 0