#!/bin/sh

set -e

# 
if [ -d /run/systemd/system ] && [ "$1" = upgrade ]; then
        deb-systemd-invoke stop 'v2ray.service' >/dev/null || true
fi
# 
# 
if [ -x "/etc/init.d/v2ray" ] && [ "$1" = upgrade ]; then
        invoke-rc.d --skip-systemd-native v2ray stop || exit 1
fi
# 

#DEBHELPER#

exit 0
