X-Git-Url: http://git.maemo.org/git/?p=vicar;a=blobdiff_plain;f=debian%2Fpostinst;h=0b3934849725d4282aac6610ae8fdb658028fe29;hp=56eb403e993469f7989f4332a091a61c579c70cb;hb=11d5c26f3a622a0fc32f9cb89e1658846201af4d;hpb=40b1207a3eb33b54e8ac780cabd4a68f7931f248 diff --git a/debian/postinst b/debian/postinst old mode 100644 new mode 100755 index 56eb403..0b39348 --- a/debian/postinst +++ b/debian/postinst @@ -23,9 +23,39 @@ case "$1" in # Kill any running instances of the daemon (only used on Linux based systems) killall -q vicar-daemon || true + killall -q vicar-telepathy || true + + echo "Starting Vicar daemon ..." + [[ -x /opt/vicar/vicar-daemon ]] && su - user -c "exec /opt/vicar/vicar-daemon& >/dev/null" + + echo "Starting Vicar-Telepathy ..." + [[ -x /opt/vicar/vicar-telepathy ]] && su - user -c "exec /opt/vicar/vicar-telepathy& >/dev/null" + + echo "Removing Vicar launch script..." + [[ -x /etc/event.d/launch-vicar ]] && rm -f /etc/event.d/launch-vicar + + echo "Deleting previous release configuration from GConf ..." + gconftool-2 --unset /apps/Maemo/vicar/routing_enabled + gconftool-2 --unset /apps/Maemo/vicar/calling_card_number + gconftool-2 --unset /apps/Maemo/vicar/dtmf_delay + gconftool-2 --unset /apps/Maemo/vicar/numbers_to_exclude + gconftool-2 --unset /apps/Maemo/vicar/dtmf_format + gconftool-2 --unset /apps/Maemo/vicar/dtmf_prefix + gconftool-2 --unset /apps/Maemo/vicar/dtmf_suffix + + echo "Creating Vicar Telepathy account ..." + [[ -x /opt/vicar/vicar-utils ]] && su - user -c "exec /opt/vicar/vicar-utils INSTALL" + + echo "Updating permissions on Vicar DB file ..." + [[ -e /home/user/vicar.db.sqlite ]] && chown user:users /home/user/vicar.db.sqlite + + echo "Creating Vicar Profiles database ..." + [[ -x /opt/vicar/vicar-utils ]] && su - user -c "exec /opt/vicar/vicar-utils CREATEDB" + + dbus-send --type=method_call --dest=org.freedesktop.Notifications /org/freedesktop/Notifications org.freedesktop.Notifications.SystemNoteDialog string:"Starting with this release, Multiple profiles can be created for routing calls via VICaR. + + Please launch VICaR to setup routing profiles." uint32:0 string:"OK" - echo "Sarting VICaR daemon ..." - [[ -x /opt/vicar/vicar-daemon ]] && exec /opt/vicar/vicar-daemon& >/dev/null ;; abort-upgrade|abort-remove|abort-deconfigure)