File: init

package info (click to toggle)
ufw 0.36.2-9
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 5,824 kB
  • sloc: python: 8,731; sh: 5,950; makefile: 200
file content (16 lines) | stat: -rwxr-xr-x 351 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#!/bin/sh

if [ -z "$SNAP" ]; then
    echo "SNAP not set"
    exit 1
fi

upgrade_path="$SNAP_DATA/.upgraded_${SNAP_REVISION}"

# ufw.srv will have already done this on install.
if [ ! -e "$upgrade_path" ]; then
    echo "Rules not found in '$SNAP_DATA'. Aborting"
    exit 1
fi

"$SNAP"/lib/ufw/ufw-init --rootdir "$SNAP" --datadir "$SNAP_DATA" "$@"