global-config 4.61 KB
Newer Older
1
#!rsc
Christian Hesse's avatar
Christian Hesse committed
2
# RouterOS script: global-config
3
# Copyright (c) 2013-2019 Christian Hesse <mail@eworm.de>
Christian Hesse's avatar
Christian Hesse committed
4 5 6
#
# global configuration

7 8
# Make sure all configuration properties are up to date and this
# value is in sync with value in script 'global-functions'!
9
:global GlobalConfigVersion 10;
10

Christian Hesse's avatar
Christian Hesse committed
11
# This is used for DNS and backup file.
12 13
:global Domain "example.com";
:global HostNameInZone true;
Christian Hesse's avatar
Christian Hesse committed
14

15 16
# These addresses are used to send e-mails to. The to-address needs
# to be filled; cc-address can be empty, one address or a comma
Christian Hesse's avatar
Christian Hesse committed
17
# separated list of addresses.
18 19
:global EmailGeneralTo "mail@example.com";
:global EmailGeneralCc "another@example.com";
Christian Hesse's avatar
Christian Hesse committed
20

21 22
# You can send Telegram notifications. Register a bot
# and add the token and chat ids here.
23 24 25 26
:global TelegramTokenId "";
:global TelegramChatId "";
#:global TelegramTokenId "123456:ABCDEF-GHI";
#:global TelegramChatId "12345678";
27

Christian Hesse's avatar
Christian Hesse committed
28
# This defines what backups to generate and what password to use.
29 30 31
:global BackupSendBinary false;
:global BackupSendExport true;
:global BackupPassword "v3ry-s3cr3t";
32 33 34
# These addresses are used to send backup and config export files to.
:global EmailBackupTo "mail@example.com";
:global EmailBackupCc "another@example.com";
35 36 37 38 39 40
# These credentials are used to upload backup and config export files.
# SFTP authentication is tricky, you may have to limit authentication
# methods for your SSH server.
:global BackupUploadUrl "sftp://example.com/backup/";
:global BackupUploadUser "mikrotik";
:global BackupUploadPass "v3ry-s3cr3t";
Christian Hesse's avatar
Christian Hesse committed
41

42 43
# Specify an address to enable auto update to version assumed safe.
# The configured channel (bugfix, current, release-candidate) is appended.
44 45
:global SafeUpdateUrl "";
#:global SafeUpdateUrl "https://example.com/ros/safe-update/";
46

47 48
# These thresholds control when to send health notification
# on temperature and voltage.
49 50 51 52 53 54
:global CheckHealthTemperature {
  temperature=50;
  cpu-temperature=70;
  board-temperature1=50;
  board-temperature2=50;
}
55
:global CheckHealthVoltagePercent 15;
56

57
# This controls what configuration is activated by bridge-port-to-default.
58
:global BridgePortTo "default";
59

60 61
# Access-list entries matching this comment are updated
# with daily pseudo-random PSK.
62 63
:global DailyPskMatchComment "Daily PSK";
:global DailyPskSecrets {
64 65 66 67 68 69 70 71 72
  { "Abusive"; "Aggressive"; "Bored"; "Chemical"; "Cold";
    "Cruel"; "Curved"; "Delightful"; "Discreet"; "Elite";
    "Evasive"; "Faded"; "Flat"; "Future"; "Grandiose";
    "Hanging"; "Humorous"; "Interesting"; "Magenta";
    "Magnificent"; "Numerous"; "Optimal"; "Pathetic";
    "Possessive"; "Remarkable"; "Rightful"; "Ruthless";
    "Stale"; "Unusual"; "Useless"; "Various" };
  { "Adhesive"; "Amusing"; "Astonishing"; "Frantic";
    "Kindhearted"; "Limping"; "Roasted"; "Robust";
73
    "Staking"; "Thundering"; "Ultra"; "Unreal" };
74 75 76
  { "Belief"; "Button"; "Curtain"; "Edge"; "Jewel";
    "String"; "Whistle" }
}
Christian Hesse's avatar
Christian Hesse committed
77

78
# Run different commands with multiple mode-button presses.
79
:global ModeButton {
80
  1="/ system script run leds-toggle-mode;";
81
  2=":global SendNotification; :global Identity; \$SendNotification (\"Hello...\") (\"Hello world, \" . \$Identity . \" calling!\");";
82 83 84
  3="/ system shutdown;";
  4="/ system reboot;";
  5="/ system script run bridge-port-toggle;";
Christian Hesse's avatar
Christian Hesse committed
85
# add more here...
86 87
};

88
# Run commands on SMS action.
89
:global SmsAction {
90
  bridge-port-toggle="/ system script run bridge-port-toggle;";
91 92
  reboot="/ system reboot;";
  shutdown="/ system shutdown;";
93
# add more here...
94
};
95

Christian Hesse's avatar
Christian Hesse committed
96 97
# This address should resolve ntp servers and is used to update
# ntp settings. A pool can rotate servers.
98
:global NtpPool "pool.ntp.org";
Christian Hesse's avatar
Christian Hesse committed
99

Christian Hesse's avatar
Christian Hesse committed
100
# This is the address used to send gps data to.
101
:global GpsTrackUrl "https://example.com/index.php";
Christian Hesse's avatar
Christian Hesse committed
102

103
# Enable this to fetch scripts from given url.
104
:global ScriptUpdatesFetch true;
105
:global ScriptUpdatesBaseUrl "https://git.eworm.de/cgit/routeros-scripts/plain/";
106 107 108 109
#:global ScriptUpdatesBaseUrl "https://raw.githubusercontent.com/eworm-de/routeros-scripts/master/";
#:global ScriptUpdatesBaseUrl "https://gitlab.com/eworm-de/routeros-scripts/raw/master/";
:global ScriptUpdatesUrlSuffix "";
:global ScriptUpdatesIgnore {
110 111
  "global-config"
}
112
# Enable this to silence all configuration warnings.
113
:global ScriptUpdatesConfigChangesIgnore false;
114 115 116 117 118 119
# This project is developed in private spare time and usage is free of charge
# for you. If you like the scripts and think this is of value for you or your
# business please consider a donation:
# https://git.eworm.de/cgit/routeros-scripts/about/#donate
# Enable this to silence donation hint.
:global IDonate false;
120

121
# Use this for certificate auto-renew
122 123
:global CertRenewUrl "";
#:global CertRenewUrl "https://example.com/certificates/";
124 125 126 127
:global CertRenewPass {
  "v3ry-s3cr3t";
  "4n0th3r-s3cr3t";
}