File: snap_cmd_wrapper

package info (click to toggle)
prometheus-openstack-exporter 0.1.4-2.3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 268 kB
  • sloc: python: 766; sh: 77; makefile: 32
file content (8 lines) | stat: -rwxr-xr-x 402 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
#!/bin/sh

# Fail if these vars are not present (e.g. from direct wrapper runs)
: ${SNAP?} ${SNAP_DATA?}
# Copy only if not existing
cp -pn $SNAP/etc/prometheus/prometheus-openstack-exporter.yaml.example $SNAP_DATA/prometheus-openstack-exporter.yaml
test -r $SNAP_DATA/admin.novarc && . $SNAP_DATA/admin.novarc
exec $SNAP/bin/prometheus-openstack-exporter $SNAP_DATA/prometheus-openstack-exporter.yaml