A common and reliable pattern in service unit files is thus:
NoNewPrivileges=yes
PrivateTmp=yes
PrivateDevices=yes
DevicePolicy=closed
ProtectSystem=strict
| groups: | |
| - name: datetime | |
| rules: | |
| - record: daily_saving_time_belgium | |
| expr: | | |
| (vector(0) and (month() < 3 or month() > 10)) | |
| or | |
| (vector(1) and (month() > 3 and month() < 10)) | |
| or | |
| ( |
| from cgi import FieldStorage | |
| from io import BytesIO | |
| def parse_into_field_storage(fp, ctype, clength): | |
| fs = FieldStorage( | |
| fp=fp, | |
| environ={'REQUEST_METHOD': 'POST'}, | |
| headers={ | |
| 'content-type': ctype, |
| Host * | |
| ControlPath ~/.ssh/control/%C | |
| ControlMaster auto |
| #!/bin/bash | |
| # Parse df selected output | |
| df -h|egrep -v 'File|tmpfs|docker|udev'| \ | |
| while read LINE; do | |
| USED_NUMBER=`echo $LINE |awk '{print $5}'|sed 's/\%//'|sed 's/ //g'` | |
| USED_PERCENT=`echo $LINE |awk '{print $5}'|sed 's/ //g'` | |
| MOUNT_POINT=`echo $LINE |awk '{print $6}'|sed 's/ //g'` | |
| if [ $USED_NUMBER -gt 80 ]; then | |
| # Create message without spaces |
| AMBARI_USER='admin' | |
| AMBARI_PASS='admin' | |
| AMBARI_AUTH='/etc/ambari-server/ambari-control.auth' | |
| AMBARI_PROPS='/etc/ambari-server/conf/ambari.properties' | |
| PROG=`basename $0` | |
| HOST=$(hostname -f) | |
| AMBARI_CLUSTER="" | |
| LIMIT=10 |
| # The full public facing url | |
| #root_url = %(protocol)s://%(domain)s:%(http_port)s/ | |
| root_url = http://localhost:80/grafana/ |