#!/bin/sh NAME="websocket-gateway" set -e if [ "$1" = "remove" ] then set +e # stop the process, if any is found. we don't want this failing to cause an error, though. stop websocket-gateway set -e if [ -f /etc/init/websocket-gateway.conf ]; then rm /etc/init/websocket-gateway.conf fi fi if [ "$1" = "purge" ] then if [ -d /var/lib/$NAME ]; then rm -rf /var/lib/$NAME fi userdel $NAME fi