#!/bin/sh -e # postinst script for ola #create the olad user, add it to groups getent passwd olad > /dev/null || adduser --system --home /usr/lib/olad --no-create-home olad getent group olad > /dev/null || addgroup --system olad groups olad | grep dialout > /dev/null || adduser olad dialout groups olad | grep plugdev > /dev/null || adduser olad plugdev # setup the config dir chown -R olad:olad /etc/ola chmod g+s /etc/ola # Perform the migration dpkg-maintscript-helper dir_to_symlink /usr/share/olad/www/new/libs/jquery/js /usr/share/javascript/jquery 0.10.9.nojsmin-1 ola -- "$@" dpkg-maintscript-helper dir_to_symlink /usr/share/olad/www/new/libs/angular/js /usr/share/javascript/angular.js 0.10.9.nojsmin-1 ola -- "$@" dpkg-maintscript-helper dir_to_symlink /usr/share/olad/www/new/libs/bootstrap /usr/share/javascript/bootstrap 0.10.9.nojsmin-1 ola -- "$@" # Automatically added by dh_installinit/13.14.1 if [ "$1" = "configure" ] || [ "$1" = "abort-upgrade" ] || [ "$1" = "abort-deconfigure" ] || [ "$1" = "abort-remove" ] ; then if [ -z "${DPKG_ROOT:-}" ] && [ -x "/etc/init.d/olad" ]; then update-rc.d olad defaults >/dev/null if [ -n "$2" ]; then _dh_action=restart else _dh_action=start fi invoke-rc.d --skip-systemd-native olad $_dh_action || exit 1 fi fi # End automatically added section exit 0