Create a template service file at /etc/systemd/system/secure-tunnel@.service. The template parameter will correspond to the name
of target host:
[Unit]
Description=Setup a secure tunnel to %I
After=network.target| #!/home/user/check_peers/venv/bin/python | |
| """ | |
| Based on portions of jfinstrom/asterisk.py but rewritten using asterisk command, | |
| checks for Availablity of a PJSIP endpoint to use with Nagios or similar software, requires python3. | |
| Usages: ./check_pjsip_endpoint.py <ext> (e.g. ./check_pjsip_endpoint.py 200) | |
| Output: Endpoint 200 is Available at 200/sip:200@172.16.16.16:5060;transport=ud, is not in use and RTT is 26.426. | |
| """ | |
| import subprocess |
| # coding: utf-8 | |
| from django.contrib import admin | |
| from django.contrib.auth.models import Group, User | |
| from django.contrib.auth.admin import GroupAdmin, UserAdmin | |
| from django.utils.translation import ugettext_lazy as _ | |
| class CustomUserAdmin(UserAdmin): | |
| fieldsets = ( |
apt-get install squidhtpasswd -md /etc/squid3/users myuserlogin`| # Copyright (c) 2012, Vehbi Sinan Tunalioglu <vst@vsthost.com> | |
| # All rights reserved. | |
| # | |
| # Redistribution and use in source and binary forms, with or without | |
| # modification, are permitted provided that the following conditions | |
| # are met: | |
| # | |
| # - Redistributions of source code must retain the above copyright | |
| # notice, this list of conditions and the following disclaimer. | |
| # |
| from django.core.exceptions import ImproperlyConfigured | |
| from django.contrib import messages | |
| class SuccessMessageMixin(object): | |
| success_message = None | |
| def get_success_message(self): | |
| if self.success_message: |
| from django.db import models | |
| class Person(models.Model): | |
| name = models.CharField(max_length=200) | |
| groups = models.ManyToManyField('Group', through='GroupMember', related_name='people') | |
| class Meta: | |
| ordering = ['name'] | |
| def __unicode__(self): |
| #!/bin/bash | |
| IPT="/sbin/iptables" | |
| # Server IP | |
| SERVER_IP="$(ip addr show eth0 | grep 'inet ' | cut -f2 | awk '{ print $2}')" | |
| # Your DNS servers you use: cat /etc/resolv.conf | |
| DNS_SERVER="8.8.4.4 8.8.8.8" | |
| # Allow connections to this package servers |
| def national_code_generator(): | |
| number_list = [] | |
| _sum = 0 | |
| out = "" | |
| for i in reversed(range(2, 11)): | |
| _j = random.randint(0, 9) | |
| number_list.append(str(_j)) | |
| _sum += _j * i | |
| _m = _sum % 11 | |
| if _m < 2: |