s6-mk

services definition for the s6-rc service manager
Log | Files | Refs

commit f792ef3bafba4ef4e030cf2690aaad2005f913bf
Author: Josuah Demangeon <mail@josuah.net>
Date:   Mon,  7 Jan 2019 22:49:32 +0100

initial import

Diffstat:
A.log/env/SERVICE | 0
A.log/run | 7+++++++
A.log/type | 1+
Aacme-client/default/dependencies | 1+
Aacme-client/default/env/AGREEMENT_URL | 1+
Aacme-client/default/env/SSLDIR | 1+
Aacme-client/default/env/WWWDIR | 1+
Aacme-client/default/run | 19+++++++++++++++++++
Aacme-client/default/setup | 17+++++++++++++++++
Aacme-client/default/type | 1+
Aacme-client/git.josuah.net/env/DOMAIN | 1+
Aacme-client/h-o.st/env/DOMAIN | 1+
Aacme-client/irc.h-o.st/env/DOMAIN | 1+
Aacme-client/josuah.net/env/DOMAIN | 1+
Aacme-client/www.josuah.net/env/DOMAIN | 1+
Aalert/default/consumer-for | 1+
Aalert/default/run | 2++
Aalert/default/type | 1+
Aaxfrdns/default/env/ROOT | 1+
Aaxfrdns/default/env/USER | 1+
Aaxfrdns/default/run | 12++++++++++++
Aaxfrdns/default/type | 1+
Abaresip/default/conf/config/audio_alert | 1+
Abaresip/default/conf/config/audio_player | 1+
Abaresip/default/conf/config/audio_source | 1+
Abaresip/default/conf/config/cons_listen | 1+
Abaresip/default/conf/config/ice_debug | 1+
Abaresip/default/conf/config/ice_mode | 1+
Abaresip/default/conf/config/ice_nomination | 1+
Abaresip/default/conf/config/ice_turn | 1+
Abaresip/default/conf/contacts/echo@creytiv.com | 1+
Abaresip/default/conf/contacts/sip904@mouselike.org | 1+
Abaresip/default/conf/modules/x | 11+++++++++++
Abaresip/default/env/USER | 1+
Abaresip/default/run | 4++++
Abaresip/default/setup | 68++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Abaresip/default/type | 1+
Abaresip/iptel.org/conf/accounts/josuah@iptel.org/auth_user | 1+
Abaresip/iptel.org/conf/accounts/josuah@iptel.org/medianat | 1+
Abaresip/iptel.org/conf/accounts/josuah@iptel.org/outbound | 1+
Abaresip/iptel.org/conf/accounts/josuah@iptel.org/stunserver | 1+
Abaresip/linphone.org/conf/accounts/josuah@sip.linphone.org/medianat | 1+
Abaresip/linphone.org/conf/accounts/josuah@sip.linphone.org/stunserver | 1+
Abaresip/linphone.org/conf/accounts/josuah@sip.linphone.org/transport | 1+
Abird/default/run | 5+++++
Abird/default/type | 1+
Acherrymusic/default/run | 7+++++++
Acherrymusic/default/type | 1+
Acollectd/default/conf/plugin/cpu/ReportByCpu | 1+
Acollectd/default/conf/plugin/cpu/ReportByState | 1+
Acollectd/default/conf/plugin/cpu/ReportGuestState | 1+
Acollectd/default/conf/plugin/cpu/ReportNumCpu | 1+
Acollectd/default/conf/plugin/cpu/SubtractGuestState | 1+
Acollectd/default/conf/plugin/cpu/ValuesPercentage | 1+
Acollectd/default/conf/plugin/csv/DataDir | 1+
Acollectd/default/conf/plugin/df/FSType | 1+
Acollectd/default/conf/plugin/df/IgnoreSelected | 1+
Acollectd/default/conf/plugin/df/ReportByDevice | 1+
Acollectd/default/conf/plugin/df/ReportInodes | 1+
Acollectd/default/conf/plugin/df/ValuesAbsolute | 1+
Acollectd/default/conf/plugin/df/ValuesPercentage | 1+
Acollectd/default/conf/plugin/disk/IgnoreSelected | 1+
Acollectd/default/conf/plugin/disk/UdevNameAttr | 1+
Acollectd/default/conf/plugin/disk/UseBSDName | 1+
Acollectd/default/conf/plugin/interface/IgnoreSelected | 1+
Acollectd/default/conf/plugin/interface/ReportInactive | 1+
Acollectd/default/conf/plugin/interface/UniqueName | 1+
Acollectd/default/conf/plugin/load/ReportRelative | 1+
Acollectd/default/conf/plugin/logfile/File | 1+
Acollectd/default/conf/plugin/logfile/LogLevel | 1+
Acollectd/default/conf/plugin/logfile/PrintSeverity | 1+
Acollectd/default/conf/plugin/logfile/Timestamp | 1+
Acollectd/default/conf/plugin/memory/ValuesAbsolute | 1+
Acollectd/default/conf/plugin/memory/ValuesPercentage | 1+
Acollectd/default/conf/variable/AutoLoadPlugin | 1+
Acollectd/default/conf/variable/FQDNLookup | 1+
Acollectd/default/conf/variable/Interval | 1+
Acollectd/default/conf/variable/MaxReadInterval | 1+
Acollectd/default/conf/variable/ReadThreads | 1+
Acollectd/default/conf/variable/Timeout | 1+
Acollectd/default/conf/variable/WriteQueueLimitHigh | 1+
Acollectd/default/conf/variable/WriteQueueLimitLow | 1+
Acollectd/default/conf/variable/WriteThreads | 1+
Acollectd/default/env/USER | 1+
Acollectd/default/run | 4++++
Acollectd/default/setup | 25+++++++++++++++++++++++++
Acollectd/default/type | 1+
Acollectd/josuah.net/conf/plug/df/Device | 1+
Acollectd/josuah.net/conf/plug/df/MountPoint | 1+
Acollectd/josuah.net/conf/plug/disk/Disk | 1+
Acollectd/josuah.net/conf/plug/interface/Interface | 1+
Acollectd/josuah.net/conf/variable/Hostname | 1+
Acurvevpn/client/env/EXT | 1+
Acurvevpn/client/env/IP | 1+
Acurvevpn/client/env/NAME | 1+
Acurvevpn/client/env/PORT | 1+
Acurvevpn/client/env/PUBKEY | 1+
Acurvevpn/client/env/ROOT | 1+
Acurvevpn/client/env/SERVER | 2++
Acurvevpn/client/run | 13+++++++++++++
Acurvevpn/client/type | 1+
Acurvevpn/default/data/data | 13+++++++++++++
Acurvevpn/default/env/EXT | 1+
Acurvevpn/default/env/NAME | 1+
Acurvevpn/default/env/PORT | 1+
Acurvevpn/default/env/ROOT | 1+
Acurvevpn/default/env/USER | 1+
Acurvevpn/default/setup | 3+++
Acurvevpn/default/type | 1+
Acurvevpn/server/env/BIND | 1+
Acurvevpn/server/run | 17+++++++++++++++++
Adirmngr/default/run | 15+++++++++++++++
Adirmngr/default/type | 1+
Adirmngr/josuah/env/USER | 1+
Adirmngr/root/env/USER | 1+
Adnscache/default/data/ip/127.0.0.1 | 0
Adnscache/default/data/servers/@ | 0
Adnscache/default/env/CACHESIZE | 1+
Adnscache/default/env/DATALIMIT | 1+
Adnscache/default/env/IP | 1+
Adnscache/default/env/IPSEND | 1+
Adnscache/default/env/ROOT | 1+
Adnscache/default/env/USER | 1+
Adnscache/default/run | 12++++++++++++
Adnscache/default/type | 1+
Affingerd/default/env/BIND | 1+
Affingerd/default/env/PORT | 1+
Affingerd/default/env/USER | 1+
Affingerd/default/run | 13+++++++++++++
Affingerd/default/type | 1+
Afossil/default/env/PORT_A | 1+
Afossil/default/env/PORT_H | 1+
Afossil/default/env/ROOT | 1+
Afossil/default/env/USER | 1+
Afossil/default/run | 15+++++++++++++++
Afossil/default/type | 1+
Ageomyidae/default/env/BIND | 1+
Ageomyidae/default/env/PORT | 1+
Ageomyidae/default/env/ROOT | 1+
Ageomyidae/default/env/USER | 1+
Ageomyidae/default/run | 12++++++++++++
Ageomyidae/default/type | 1+
Ageomyidae/ipv4/env/IPV | 1+
Ageomyidae/ipv6/env/IPV | 1+
Agit-daemon/default/env/BIND | 1+
Agit-daemon/default/env/PORT | 1+
Agit-daemon/default/env/ROOT | 1+
Agit-daemon/default/env/USER | 1+
Agit-daemon/default/run | 12++++++++++++
Agit-daemon/default/type | 1+
Agit-mirror/default/data/mirror | 3+++
Agit-mirror/default/env/GIT | 1+
Agit-mirror/default/env/USER | 1+
Agit-mirror/default/run | 12++++++++++++
Agpg-agent/default/run | 15+++++++++++++++
Agpg-agent/default/type | 1+
Agpg-agent/josuah/env/USER | 1+
Agpg-agent/root/env/USER | 1+
Ahost/default/type | 1+
Ahost/kuntur/contents | 10++++++++++
Ahttpfile/default/env/ACCESSFILE | 1+
Ahttpfile/default/env/BIND | 1+
Ahttpfile/default/env/ROOT | 1+
Ahttpfile/default/env/USER | 1+
Ahttpfile/default/setup | 7+++++++
Ahttpfile/default/type | 1+
Ahttpfile/h-o.st/env/CERTFILE | 1+
Ahttpfile/h-o.st/env/KEYFILE | 1+
Ahttpfile/tcp/env/PORT | 1+
Ahttpfile/tcp/run | 13+++++++++++++
Ahttpfile/tls/env/CERTFILE | 1+
Ahttpfile/tls/env/KEYFILE | 1+
Ahttpfile/tls/env/PORT | 1+
Ahttpfile/tls/run | 16++++++++++++++++
Aii/default/env/ROOT | 1+
Aii/default/env/USER | 1+
Aii/default/finish | 2++
Aii/default/setup | 10++++++++++
Aii/default/timeout-finish | 1+
Aii/default/type | 1+
Aii/irc.cyberia.is/env/HOST | 1+
Aii/irc.cyberia.is/env/NAME | 1+
Aii/irc.cyberia.is/env/NICK | 1+
Aii/irc.epitech.eu/env/HOST | 1+
Aii/irc.epitech.eu/env/NAME | 1+
Aii/irc.epitech.eu/env/NICK | 1+
Aii/irc.freenode.net/env/HOST | 1+
Aii/irc.freenode.net/env/NAME | 1+
Aii/irc.freenode.net/env/NICK | 1+
Aii/irc.h-o.st/env/HOST | 1+
Aii/irc.h-o.st/env/NAME | 1+
Aii/irc.h-o.st/env/NICK | 1+
Aii/irc.oftc.net/env/HOST | 1+
Aii/irc.oftc.net/env/NAME | 1+
Aii/irc.oftc.net/env/NICK | 1+
Aii/monit-bot/env/HOST | 1+
Aii/monit-bot/env/NAME | 1+
Aii/monit-bot/env/NICK | 1+
Aii/monit-bot/env/ROOT | 1+
Aii/tcp/env/PORT | 1+
Aii/tcp/run | 19+++++++++++++++++++
Aii/tls/env/CAFILE | 1+
Aii/tls/env/PORT | 1+
Aii/tls/run | 26++++++++++++++++++++++++++
Akamailio/default/conf/define/FLB_NATB | 1+
Akamailio/default/conf/define/FLB_NATSIPPING | 1+
Akamailio/default/conf/define/FLT_ACC | 1+
Akamailio/default/conf/define/FLT_ACCFAILED | 1+
Akamailio/default/conf/define/FLT_ACCMISSED | 1+
Akamailio/default/conf/define/FLT_NATS | 1+
Akamailio/default/conf/define/MULTIDOMAIN | 1+
Akamailio/default/conf/modparam/acc/db_extra | 1+
Akamailio/default/conf/modparam/acc/db_flag | 1+
Akamailio/default/conf/modparam/acc/db_missed_flag | 1+
Akamailio/default/conf/modparam/acc/db_url | 1+
Akamailio/default/conf/modparam/acc/detect_direction | 1+
Akamailio/default/conf/modparam/acc/early_media | 1+
Akamailio/default/conf/modparam/acc/failed_transaction_flag | 1+
Akamailio/default/conf/modparam/acc/log_extra | 1+
Akamailio/default/conf/modparam/acc/log_flag | 1+
Akamailio/default/conf/modparam/acc/log_missed_flag | 1+
Akamailio/default/conf/modparam/acc/report_ack | 1+
Akamailio/default/conf/modparam/acc/report_cancels | 1+
Akamailio/default/conf/modparam/alias_db/db_url | 1+
Akamailio/default/conf/modparam/alias_db/use_domain | 1+
Akamailio/default/conf/modparam/auth_db/calculate_ha1 | 1+
Akamailio/default/conf/modparam/auth_db/db_url | 1+
Akamailio/default/conf/modparam/auth_db/load_credentials | 1+
Akamailio/default/conf/modparam/auth_db/password_column | 1+
Akamailio/default/conf/modparam/auth_db/use_domain | 1+
Akamailio/default/conf/modparam/ctl/binrpc | 1+
Akamailio/default/conf/modparam/debugger/cfgtrace | 1+
Akamailio/default/conf/modparam/debugger/log_level_name | 1+
Akamailio/default/conf/modparam/domain/db_url | 1+
Akamailio/default/conf/modparam/domain/register_myself | 1+
Akamailio/default/conf/modparam/htable/htable | 1+
Akamailio/default/conf/modparam/jsonrpcs/dgram_socket | 1+
Akamailio/default/conf/modparam/jsonrpcs/fifo_name | 1+
Akamailio/default/conf/modparam/jsonrpcs/pretty_format | 1+
Akamailio/default/conf/modparam/nathelper/natping_interval | 1+
Akamailio/default/conf/modparam/nathelper/ping_nated_only | 1+
Akamailio/default/conf/modparam/nathelper/sipping_bflag | 1+
Akamailio/default/conf/modparam/nathelper/sipping_from | 1+
Akamailio/default/conf/modparam/nathelper|registrar/received_avp | 1+
Akamailio/default/conf/modparam/permissions/db_mode | 1+
Akamailio/default/conf/modparam/permissions/db_url | 1+
Akamailio/default/conf/modparam/pike/remove_latency | 1+
Akamailio/default/conf/modparam/pike/reqs_density_per_unit | 1+
Akamailio/default/conf/modparam/pike/sampling_time_unit | 1+
Akamailio/default/conf/modparam/registrar/append_branches | 1+
Akamailio/default/conf/modparam/registrar/gruu_enabled | 1+
Akamailio/default/conf/modparam/registrar/max_contacts | 1+
Akamailio/default/conf/modparam/registrar/max_expires | 1+
Akamailio/default/conf/modparam/registrar/method_filtering | 1+
Akamailio/default/conf/modparam/rr/append_fromtag | 1+
Akamailio/default/conf/modparam/rr/enable_full_lr | 1+
Akamailio/default/conf/modparam/rtpproxy/rtpproxy_sock | 1+
Akamailio/default/conf/modparam/speeddial/db_url | 1+
Akamailio/default/conf/modparam/speeddial/use_domain | 1+
Akamailio/default/conf/modparam/tm/failure_reply_mode | 1+
Akamailio/default/conf/modparam/tm/fr_inv_timer | 1+
Akamailio/default/conf/modparam/tm/fr_timer | 1+
Akamailio/default/conf/modparam/usrloc/db_mode | 1+
Akamailio/default/conf/modparam/usrloc/db_url | 1+
Akamailio/default/conf/modparam/usrloc/nat_bflag | 1+
Akamailio/default/conf/modparam/usrloc/use_domain | 1+
Akamailio/default/conf/module/acc | 1+
Akamailio/default/conf/module/alias_db | 0
Akamailio/default/conf/module/auth | 0
Akamailio/default/conf/module/auth_db | 0
Akamailio/default/conf/module/cfg_rpc | 0
Akamailio/default/conf/module/corex | 0
Akamailio/default/conf/module/counters | 0
Akamailio/default/conf/module/ctl | 0
Akamailio/default/conf/module/debugger | 0
Akamailio/default/conf/module/domain | 0
Akamailio/default/conf/module/htable | 0
Akamailio/default/conf/module/jsonrpcs | 0
Akamailio/default/conf/module/kex | 0
Akamailio/default/conf/module/maxfwd | 0
Akamailio/default/conf/module/nathelper | 0
Akamailio/default/conf/module/permissions | 0
Akamailio/default/conf/module/pike | 0
Akamailio/default/conf/module/pv | 0
Akamailio/default/conf/module/registrar | 0
Akamailio/default/conf/module/rr | 0
Akamailio/default/conf/module/rtpproxy | 0
Akamailio/default/conf/module/sanity | 0
Akamailio/default/conf/module/siputils | 0
Akamailio/default/conf/module/sl | 0
Akamailio/default/conf/module/speeddial | 0
Akamailio/default/conf/module/textops | 0
Akamailio/default/conf/module/tm | 0
Akamailio/default/conf/module/tmx | 1+
Akamailio/default/conf/module/usrloc | 1+
Akamailio/default/conf/module/xlog | 0
Akamailio/default/conf/route/branch_route/MANAGE_BRANCH | 4++++
Akamailio/default/conf/route/failure_route/MANAGE_FAILURE | 31+++++++++++++++++++++++++++++++
Akamailio/default/conf/route/onreply_route/MANAGE_REPLY | 6++++++
Akamailio/default/conf/route/route/0 | 69+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Akamailio/default/conf/route/route/AUTH | 38++++++++++++++++++++++++++++++++++++++
Akamailio/default/conf/route/route/DLGURI | 8++++++++
Akamailio/default/conf/route/route/LOCATION | 41+++++++++++++++++++++++++++++++++++++++++
Akamailio/default/conf/route/route/NATDETECT | 16++++++++++++++++
Akamailio/default/conf/route/route/NATMANAGE | 33+++++++++++++++++++++++++++++++++
Akamailio/default/conf/route/route/PRESENCE | 33+++++++++++++++++++++++++++++++++
Akamailio/default/conf/route/route/PSTN | 39+++++++++++++++++++++++++++++++++++++++
Akamailio/default/conf/route/route/REGISTRAR | 15+++++++++++++++
Akamailio/default/conf/route/route/RELAY | 18++++++++++++++++++
Akamailio/default/conf/route/route/REQINIT | 39+++++++++++++++++++++++++++++++++++++++
Akamailio/default/conf/route/route/SIPOUT | 7+++++++
Akamailio/default/conf/route/route/TOVOICEMAIL | 26++++++++++++++++++++++++++
Akamailio/default/conf/route/route/WITHINDLG | 41+++++++++++++++++++++++++++++++++++++++++
Akamailio/default/conf/setup-dep | 8++++++++
Akamailio/default/conf/variable/children | 1+
Akamailio/default/conf/variable/debug | 1+
Akamailio/default/conf/variable/enable_tls | 1+
Akamailio/default/conf/variable/log_facility | 1+
Akamailio/default/conf/variable/log_prefix | 1+
Akamailio/default/conf/variable/log_stderror | 1+
Akamailio/default/conf/variable/memdbg | 1+
Akamailio/default/conf/variable/memlog | 1+
Akamailio/default/conf/variable/pstn.gw_ip | 1+
Akamailio/default/conf/variable/pstn.gw_port | 1+
Akamailio/default/conf/variable/tcp_connection_lifetime | 1+
Akamailio/default/conf/variable/voicemail.srv_ip | 1+
Akamailio/default/conf/variable/voicemail.srv_port | 1+
Akamailio/default/env/BIND | 1+
Akamailio/default/env/MODULES_DIR | 1+
Akamailio/default/env/USER | 1+
Akamailio/default/run | 12++++++++++++
Akamailio/default/setup | 83+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Akamailio/default/type | 1+
Akamailio/presence/conf/db/sqlite/presence-create.sql | 122+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Akamailio/presence/conf/modparam/presence/db_url | 1+
Akamailio/presence/conf/modparam/presence_xml/db_url | 1+
Akamailio/presence/conf/modparam/presence_xml/force_active | 1+
Akamailio/sqlite/conf/define/DBURL | 1+
Akamailio/sqlite/conf/module/db_sqlite | 0
Akamailio/sqlite/conf/sqlite-extra/carrierroute-create.sql | 46++++++++++++++++++++++++++++++++++++++++++++++
Akamailio/sqlite/conf/sqlite-extra/cpl-create.sql | 11+++++++++++
Akamailio/sqlite/conf/sqlite-extra/domainpolicy-create.sql | 14++++++++++++++
Akamailio/sqlite/conf/sqlite-extra/drouting-create.sql | 43+++++++++++++++++++++++++++++++++++++++++++
Akamailio/sqlite/conf/sqlite-extra/htable-create.sql | 11+++++++++++
Akamailio/sqlite/conf/sqlite-extra/imc-create.sql | 21+++++++++++++++++++++
Akamailio/sqlite/conf/sqlite-extra/matrix-create.sql | 10++++++++++
Akamailio/sqlite/conf/sqlite-extra/mohqueue-create.sql | 26++++++++++++++++++++++++++
Akamailio/sqlite/conf/sqlite-extra/mtree-create.sql | 19+++++++++++++++++++
Akamailio/sqlite/conf/sqlite-extra/pipelimit-create.sql | 9+++++++++
Akamailio/sqlite/conf/sqlite-extra/purple-create.sql | 10++++++++++
Akamailio/sqlite/conf/sqlite-extra/rls-create.sql | 53+++++++++++++++++++++++++++++++++++++++++++++++++++++
Akamailio/sqlite/conf/sqlite-extra/rtpengine-create.sql | 12++++++++++++
Akamailio/sqlite/conf/sqlite-extra/rtpproxy-create.sql | 11+++++++++++
Akamailio/sqlite/conf/sqlite-extra/sca-create.sql | 23+++++++++++++++++++++++
Akamailio/sqlite/conf/sqlite-extra/siptrace-create.sql | 23+++++++++++++++++++++++
Akamailio/sqlite/conf/sqlite-extra/topos-create.sql | 69+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Akamailio/sqlite/conf/sqlite-extra/uac-create.sql | 20++++++++++++++++++++
Akamailio/sqlite/conf/sqlite-extra/uid_auth_db-create.sql | 19+++++++++++++++++++
Akamailio/sqlite/conf/sqlite-extra/uid_avp_db-create.sql | 12++++++++++++
Akamailio/sqlite/conf/sqlite-extra/uid_domain-create.sql | 26++++++++++++++++++++++++++
Akamailio/sqlite/conf/sqlite-extra/uid_gflags-create.sql | 11+++++++++++
Akamailio/sqlite/conf/sqlite-extra/uid_uri_db-create.sql | 28++++++++++++++++++++++++++++
Akamailio/sqlite/conf/sqlite-extra/userblacklist-create.sql | 23+++++++++++++++++++++++
Akamailio/sqlite/conf/sqlite/acc-create.sql | 41+++++++++++++++++++++++++++++++++++++++++
Akamailio/sqlite/conf/sqlite/alias_db-create.sql | 14++++++++++++++
Akamailio/sqlite/conf/sqlite/auth_db-create.sql | 14++++++++++++++
Akamailio/sqlite/conf/sqlite/avpops-create.sql | 16++++++++++++++++
Akamailio/sqlite/conf/sqlite/dialog-create.sql | 43+++++++++++++++++++++++++++++++++++++++++++
Akamailio/sqlite/conf/sqlite/dialplan-create.sql | 14++++++++++++++
Akamailio/sqlite/conf/sqlite/dispatcher-create.sql | 12++++++++++++
Akamailio/sqlite/conf/sqlite/domain-create.sql | 23+++++++++++++++++++++++
Akamailio/sqlite/conf/sqlite/group-create.sql | 21+++++++++++++++++++++
Akamailio/sqlite/conf/sqlite/lcr-create.sql | 49+++++++++++++++++++++++++++++++++++++++++++++++++
Akamailio/sqlite/conf/sqlite/msilo-create.sql | 20++++++++++++++++++++
Akamailio/sqlite/conf/sqlite/pdt-create.sql | 10++++++++++
Akamailio/sqlite/conf/sqlite/permissions-create.sql | 25+++++++++++++++++++++++++
Akamailio/sqlite/conf/sqlite/registrar-create.sql | 32++++++++++++++++++++++++++++++++
Akamailio/sqlite/conf/sqlite/speeddial-create.sql | 15+++++++++++++++
Akamailio/sqlite/conf/sqlite/standard-create.sql | 8++++++++
Akamailio/sqlite/conf/sqlite/uri_db-create.sql | 11+++++++++++
Akamailio/sqlite/conf/sqlite/usrloc-create.sql | 49+++++++++++++++++++++++++++++++++++++++++++++++++
Akamailio/sqlite/setup | 6++++++
Akamailio/tls/conf/modparam/tls/config | 1+
Amonit/default/data/alert/irc | 17+++++++++++++++++
Amonit/default/data/check/http | 21+++++++++++++++++++++
Amonit/default/data/check/smtp | 14++++++++++++++
Amonit/default/data/uri/test | 4++++
Amonit/default/env/IRC_CHAN | 1+
Amonit/default/env/IRC_HOST | 1+
Amonit/default/env/IRC_ROOT | 1+
Amonit/default/producer-for | 1+
Amonit/default/run | 18++++++++++++++++++
Amonit/default/timeout-finish | 1+
Amonit/default/type | 1+
Ampop/default/data/mpoprc | 15+++++++++++++++
Ampop/default/run | 15+++++++++++++++
Ampop/default/type | 1+
Angircd/default/conf/Global/Info | 1+
Angircd/default/conf/Global/MotdFile | 1+
Angircd/default/conf/Global/Ports | 1+
Angircd/default/conf/Limits/MaxConnections | 1+
Angircd/default/conf/Limits/MaxConnectionsIP | 1+
Angircd/default/conf/Limits/MaxJoins | 1+
Angircd/default/conf/Limits/MaxNickLength | 1+
Angircd/default/conf/Limits/PingTimeout | 1+
Angircd/default/conf/Limits/PongTimeout | 1+
Angircd/default/conf/Options/AllowRemoteOper | 1+
Angircd/default/conf/Options/AllowedChannelTypes | 1+
Angircd/default/conf/Options/CloakHost | 1+
Angircd/default/conf/Options/DNS | 1+
Angircd/default/conf/Options/DefaultUserModes | 1+
Angircd/default/conf/Options/Ident | 1+
Angircd/default/conf/Options/MorePrivacy | 1+
Angircd/default/conf/Options/OperCanUseMode | 1+
Angircd/default/conf/Options/OperChanPAutoOp | 1+
Angircd/default/env/USER | 1+
Angircd/default/run | 4++++
Angircd/default/setup | 19+++++++++++++++++++
Angircd/default/type | 1+
Angircd/irc.h-o.st/conf/Global/AdminEMail | 1+
Angircd/irc.h-o.st/conf/Global/AdminInfo1 | 1+
Angircd/irc.h-o.st/conf/Global/AdminInfo2 | 1+
Angircd/irc.h-o.st/conf/Global/Name | 1+
Angircd/irc.h-o.st/conf/Operator/Mask | 1+
Angircd/irc.h-o.st/conf/Operator/Name | 1+
Angircd/irc.h-o.st/conf/Operator/Password | 0
Angircd/irc.h-o.st/conf/Options/CloakHostSalt | 1+
Angircd/irc.h-o.st/conf/SSL/CertFile | 1+
Angircd/irc.h-o.st/conf/SSL/KeyFile | 1+
Angircd/irc.h-o.st/conf/Server/Host | 1+
Angircd/irc.h-o.st/data/motd | 44++++++++++++++++++++++++++++++++++++++++++++
Angircd/tls/conf/SSL/CipherList | 1+
Angircd/tls/conf/SSL/DHFile | 1+
Angircd/tls/conf/SSL/Ports | 1+
Antpclient/default/env/BIND | 1+
Antpclient/default/run | 9+++++++++
Antpclient/default/type | 1+
Aopentracker/default/env/USER | 1+
Aopentracker/default/run | 4++++
Aopentracker/default/type | 1+
Apjsua/default/conf/auto-play | 1+
Apjsua/default/conf/cli-telnet-port | 1+
Apjsua/default/conf/no-cli-console | 0
Apjsua/default/conf/realm | 1+
Apjsua/default/conf/use-cli | 0
Apjsua/default/env/USER | 1+
Apjsua/default/run | 4++++
Apjsua/default/setup | 14++++++++++++++
Apjsua/default/type | 1+
Apjsua/iptel.org/conf/id | 1+
Apjsua/iptel.org/conf/password | 1+
Apjsua/iptel.org/conf/registrar | 1+
Apjsua/iptel.org/conf/username | 1+
Apjsua/log/env/SERVICE | 0
Apjsua/log/run | 9+++++++++
Apjsua/log/type | 1+
Aqemu/default/env/DISPLAY | 1+
Aqemu/default/env/MAC | 1+
Aqemu/default/env/MEM | 1+
Aqemu/default/env/NAME | 1+
Aqemu/default/env/ROOT | 1+
Aqemu/default/env/USER | 1+
Aqemu/default/type | 1+
Aqemu/net-tap/run | 27+++++++++++++++++++++++++++
Aqemu/net-user/env/PORT_SSH | 1+
Aqemu/net-user/run | 27+++++++++++++++++++++++++++
Aqmail-pop3d/default/env/BIND | 1+
Aqmail-pop3d/default/env/CERTFILE | 1+
Aqmail-pop3d/default/env/KEYFILE | 1+
Aqmail-pop3d/default/env/MAILDIR | 1+
Aqmail-pop3d/default/env/PORT | 1+
Aqmail-pop3d/default/run | 12++++++++++++
Aqmail-pop3d/default/type | 1+
Aqmail-send/default/conf/control/locals | 1+
Aqmail-send/default/conf/control/me | 1+
Aqmail-send/default/env/GROUP | 1+
Aqmail-send/default/env/MAILDIR | 1+
Aqmail-send/default/env/USER | 1+
Aqmail-send/default/run | 9+++++++++
Aqmail-send/default/setup | 84+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Aqmail-send/default/type | 1+
Aqmail-send/josuah.net/conf/alias/.qmail-abuse | 1+
Aqmail-send/josuah.net/conf/alias/.qmail-default | 1+
Aqmail-send/josuah.net/conf/alias/.qmail-mailer-daemon | 1+
Aqmail-send/josuah.net/conf/alias/.qmail-postmaster | 1+
Aqmail-send/josuah.net/conf/alias/.qmail-root | 1+
Aqmail-send/josuah.net/conf/control/authsenders | 1+
Aqmail-send/josuah.net/conf/control/locals | 2++
Aqmail-send/josuah.net/conf/control/me | 1+
Aqmail-send/josuah.net/conf/control/tlsdestinations | 2++
Aqmail-smtpd/default/conf/control/badloadertypes | 4++++
Aqmail-smtpd/default/conf/control/badmailfrom | 5+++++
Aqmail-smtpd/default/conf/control/badmimetypes | 12++++++++++++
Aqmail-smtpd/default/conf/control/badrcptto | 4++++
Aqmail-smtpd/default/conf/control/databytes | 0
Aqmail-smtpd/default/conf/control/rcpthosts | 0
Aqmail-smtpd/default/conf/control/timeoutsmtpd | 0
Aqmail-smtpd/default/env/BIND | 1+
Aqmail-smtpd/default/run | 17+++++++++++++++++
Aqmail-smtpd/default/setup | 3+++
Aqmail-smtpd/default/type | 1+
Aqmail-smtpd/josuah.net/conf/control/rcpthosts | 1+
Aqmail-smtpd/josuah.net/env/CERTFILE | 1+
Aqmail-smtpd/josuah.net/env/KEYFILE | 1+
Aqmail-smtpd/log/env/SERVICE | 0
Aqmail-smtpd/log/run | 9+++++++++
Aqmail-smtpd/log/type | 1+
Aqmail-smtpd/tcp/env/PORT | 1+
Aqmail-smtpd/tcp/env/SERVER | 1+
Aqmail-smtpd/tls/env/CERTFILE | 0
Aqmail-smtpd/tls/env/KEYFILE | 0
Aqmail-smtpd/tls/env/PORT | 1+
Aqmail-smtpd/tls/env/SERVER | 1+
Aratox/default/run | 14++++++++++++++
Aratox/default/type | 1+
Aratox/josuah/env/USER | 1+
Asndiod/default/env/BIND | 1+
Asndiod/default/env/USER | 1+
Asndiod/default/run | 9+++++++++
Asndiod/default/type | 1+
Assh-agent/default/run | 14++++++++++++++
Assh-agent/default/type | 1+
Assh-agent/josuah/env/USER | 1+
Assh-agent/root/env/USER | 1+
Atapio/client/run | 13+++++++++++++
Atapio/default/env/IFACE | 1+
Atapio/default/env/MODE | 1+
Atapio/default/env/PORT | 1+
Atapio/default/env/USER | 1+
Atapio/default/type | 1+
Atapio/server/env/BIND | 1+
Atapio/server/run | 13+++++++++++++
Atest/current | 1+
Atest/lock | 0
Atest/state | 0
Atinc/default/data/conf.d/common.conf | 2++
Atinc/default/data/tinc-up | 11+++++++++++
Atinc/default/env/USER | 1+
Atinc/default/run | 4++++
Atinc/default/type | 1+
Atinc/josuah.net/data/hosts/kroa | 13+++++++++++++
Atinc/josuah.net/data/hosts/nas | 13+++++++++++++
Atinc/josuah.net/data/hosts/pdmg | 12++++++++++++
Atinc/josuah.net/data/hosts/rpi | 13+++++++++++++
Atinc/josuah.net/data/hosts/t470s | 12++++++++++++
Atinydns/default/env/IP | 1+
Atinydns/default/env/ROOT | 1+
Atinydns/default/env/USER | 1+
Atinydns/default/run | 10++++++++++
Atinydns/default/setup | 60++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Atinydns/default/type | 1+
Atinydns/h-o.st/conf/alias/h-o.st/@ | 2++
Atinydns/h-o.st/conf/alias/h-o.st/g | 2++
Atinydns/h-o.st/conf/alias/h-o.st/git | 2++
Atinydns/h-o.st/conf/alias/h-o.st/mac/54e1ad43a3a4 | 2++
Atinydns/h-o.st/conf/alias/himalaya-solaire.org/@ | 2++
Atinydns/h-o.st/conf/alias/josuah.net/@ | 2++
Atinydns/h-o.st/conf/alias/josuah.net/git | 2++
Atinydns/h-o.st/conf/alias/josuah.net/irc | 2++
Atinydns/h-o.st/conf/host/h-o.st/glaphyrae | 2++
Atinydns/h-o.st/conf/ns/h-o.st | 2++
Atinydns/h-o.st/conf/ns/himalaya-solaire.org | 2++
Atinydns/h-o.st/conf/ns/josuah.net | 2++
Atinydns/h-o.st/conf/txt/h-o.st | 1+
Atinydns/h-o.st/conf/txt/himalaya-solaire.org | 1+
Atinydns/h-o.st/conf/txt/josuah.net | 1+
Atinysshd/default/env/BIND | 1+
Atinysshd/default/env/PORT | 1+
Atinysshd/default/run | 11+++++++++++
Atinysshd/default/setup | 5+++++
Atinysshd/default/type | 1+
Ator/default/conf/Log | 1+
Ator/default/conf/PIDFile | 1+
Ator/default/conf/RunAsDaemon | 1+
Ator/default/conf/SOCKSPort | 1+
Ator/default/conf/User | 1+
Ator/default/env/USER | 1+
Ator/default/run | 11+++++++++++
Ator/default/setup | 24++++++++++++++++++++++++
Ator/default/type | 1+
Ator/gopher/conf/service/gopher/HiddenServiceDir | 1+
Ator/gopher/conf/service/gopher/HiddenServicePort | 1+
Ator/http/conf/service/http/HiddenServiceDir | 1+
Ator/http/conf/service/http/HiddenServicePort | 1+
Ator/icecast/conf/service/icecast/HiddenServiceDir | 1+
Ator/icecast/conf/service/icecast/HiddenServicePort | 1+
Atransmission/default/conf/b-incomplete-dir-enabled | 1+
Atransmission/default/conf/b-rpc-authentication-required | 1+
Atransmission/default/conf/n-peer-port | 1+
Atransmission/default/conf/n-rpc-port | 1+
Atransmission/default/conf/s-bind-address-ipv4 | 1+
Atransmission/default/conf/s-bind-address-ipv6 | 1+
Atransmission/default/conf/s-download-dir | 1+
Atransmission/default/conf/s-incomplete-dir | 1+
Atransmission/default/conf/s-rpc-bind-address | 1+
Atransmission/default/conf/s-rpc-url | 1+
Atransmission/default/env/USER | 1+
Atransmission/default/run | 8++++++++
Atransmission/default/setup | 27+++++++++++++++++++++++++++
Atransmission/default/type | 1+
Au9fs-mount/default/down | 4++++
Au9fs-mount/default/env/USER | 1+
Au9fs-mount/default/producer-for | 1+
Au9fs-mount/default/type | 1+
Au9fs-mount/default/up | 5+++++
Au9fs-ssh/default/env/USER | 1+
Au9fs-ssh/default/run | 6++++++
Au9fs-ssh/default/type | 1+
Aventi/default/data/conf | 8++++++++
Aventi/default/data/fmt | 9+++++++++
Aventi/default/env/PORT_A | 1+
Aventi/default/env/PORT_H | 1+
Aventi/default/env/ROOT | 1+
Aventi/default/env/USER | 1+
Aventi/default/run | 15+++++++++++++++
Aventi/default/type | 1+
Avsftpd/default/conf/allow_anon_ssl | 1+
Avsftpd/default/conf/anon_root | 1+
Avsftpd/default/conf/anonymous_enable | 1+
Avsftpd/default/conf/banner_file | 1+
Avsftpd/default/conf/delete_failed_uploads | 1+
Avsftpd/default/conf/dirmessage_enable | 1+
Avsftpd/default/conf/ftp_username | 1+
Avsftpd/default/conf/listen | 1+
Avsftpd/default/conf/listen_port | 1+
Avsftpd/default/conf/local_enable | 1+
Avsftpd/default/conf/mdtm_write | 1+
Avsftpd/default/conf/message_file | 1+
Avsftpd/default/conf/pasv_enable | 1+
Avsftpd/default/conf/pasv_promiscuous | 1+
Avsftpd/default/conf/port_enable | 1+
Avsftpd/default/conf/secure_chroot_dir | 1+
Avsftpd/default/conf/tcp_wrappers | 1+
Avsftpd/default/conf/user_config_dir | 1+
Avsftpd/default/conf/user_sub_token | 1+
Avsftpd/default/conf/userlist_deny | 1+
Avsftpd/default/conf/userlist_enable | 1+
Avsftpd/default/conf/userlist_file | 1+
Avsftpd/default/conf/vsftpd_log_file | 1+
Avsftpd/default/data/banner | 0
Avsftpd/default/env/USER | 1+
Avsftpd/default/run | 4++++
Avsftpd/default/setup | 23+++++++++++++++++++++++
Avsftpd/default/type | 1+
Avsftpd/josuah.net/conf/local_enable | 1+
Avsftpd/josuah.net/conf/rsa_cert_file | 1+
Avsftpd/josuah.net/conf/rsa_private_key_file | 1+
Avsftpd/josuah.net/data/banner | 3+++
Avsftpd/josuah.net/data/user/mark | 0
Avsftpd/tls/conf/allow_anon_ssl | 1+
Avsftpd/tls/conf/ssl_enable | 1+
Avtund/client/conf/options/persist | 1+
Avtund/client/run | 9+++++++++
Avtund/default/conf/options/port | 1+
Avtund/default/conf/options/type | 1+
Avtund/default/env/USER | 1+
Avtund/default/print | 17+++++++++++++++++
Avtund/default/setup | 11+++++++++++
Avtund/default/type | 1+
Avtund/h-o.st/conf/kuntur/device | 1+
Avtund/h-o.st/env/SESSION | 1+
Avtund/kuntur/env/HOST | 1+
Avtund/kuntur/env/SESSION | 1+
Avtund/server/conf/default/compress | 1+
Avtund/server/conf/default/encrypt | 1+
Avtund/server/conf/default/proto | 1+
Avtund/server/conf/default/type | 1+
Avtund/server/conf/options/bindaddr/addr | 1+
Avtund/server/run | 5+++++
Awalldns/default/env/IP | 1+
Awalldns/default/env/ROOT | 1+
Awalldns/default/env/USER | 1+
Awalldns/default/run | 5+++++
Awalldns/default/type | 1+
Awarp-vpn/client/run | 10++++++++++
Awarp-vpn/default/env/DEVTYPE | 1+
Awarp-vpn/default/env/PORT | 1+
Awarp-vpn/default/env/USER | 1+
Awarp-vpn/default/type | 1+
Awarp-vpn/server/env/BIND | 1+
Awarp-vpn/server/run | 11+++++++++++
681 files changed, 3459 insertions(+), 0 deletions(-)

diff --git a/.log/env/SERVICE b/.log/env/SERVICE diff --git a/.log/run b/.log/run @@ -0,0 +1,7 @@ +#!/usr/bin/env execlineb +fdmove -c 2 1 +s6-envdir env + +importas SERVICE SERVICE + +s6-log -b t /var/log/${SERVICE} diff --git a/.log/type b/.log/type @@ -0,0 +1 @@ +longrun diff --git a/acme-client/default/dependencies b/acme-client/default/dependencies @@ -0,0 +1 @@ +httpfile diff --git a/acme-client/default/env/AGREEMENT_URL b/acme-client/default/env/AGREEMENT_URL @@ -0,0 +1 @@ +https://letsencrypt.org/documents/LE-SA-v1.2-November-15-2017.pdf diff --git a/acme-client/default/env/SSLDIR b/acme-client/default/env/SSLDIR @@ -0,0 +1 @@ +/etc/ssl diff --git a/acme-client/default/env/WWWDIR b/acme-client/default/env/WWWDIR @@ -0,0 +1 @@ +/var/www diff --git a/acme-client/default/run b/acme-client/default/run @@ -0,0 +1,19 @@ +#!/usr/bin/env execlineb +fdmove -c 2 1 +s6-envdir env + +multisubstitute { + importas AGREEMENT_URL AGREEMENT_URL + importas WWWDIR WWWDIR + importas SSLDIR SSLDIR + importas DOMAIN DOMAIN +} + +snooze -d1 +acme-client -vnN + -a ${AGREEMENT_URL} + -C ${WWWDIR}/${DOMAIN}/:well-known/acme-challenge + -c ${SSLDIR}/${DOMAIN} + -k ${SSLDIR}/${DOMAIN}/privkey.pem + -f ${SSLDIR}/private/privkey.pem + ${DOMAIN} diff --git a/acme-client/default/setup b/acme-client/default/setup @@ -0,0 +1,17 @@ +#!/usr/bin/env execlineb +s6-envdir env + +multisubstitute { + importas WWWDIR WWWDIR + importas SSLDIR SSLDIR + importas DOMAIN DOMAIN +} + +# It uses ":well-known" instead of ".well-known" because httpfile(1) +# translates ':' to '.'. + +if { mkdir -p ${WWWDIR}/${DOMAIN}/:well-known/acme-challenge } +if { mkdir -p ${SSLDIR}/${DOMAIN} } +if { mkdir -p ${SSLDIR}/private } +if { mkdir -p /var/empty } +if { chmod 700 ${SSLDIR}/private } diff --git a/acme-client/default/type b/acme-client/default/type @@ -0,0 +1 @@ +longrun diff --git a/acme-client/git.josuah.net/env/DOMAIN b/acme-client/git.josuah.net/env/DOMAIN @@ -0,0 +1 @@ +git.josuah.net diff --git a/acme-client/h-o.st/env/DOMAIN b/acme-client/h-o.st/env/DOMAIN @@ -0,0 +1 @@ +h-o.st diff --git a/acme-client/irc.h-o.st/env/DOMAIN b/acme-client/irc.h-o.st/env/DOMAIN @@ -0,0 +1 @@ +irc.h-o.st diff --git a/acme-client/josuah.net/env/DOMAIN b/acme-client/josuah.net/env/DOMAIN @@ -0,0 +1 @@ +josuah.net diff --git a/acme-client/www.josuah.net/env/DOMAIN b/acme-client/www.josuah.net/env/DOMAIN @@ -0,0 +1 @@ +www.josuah.net diff --git a/alert/default/consumer-for b/alert/default/consumer-for @@ -0,0 +1 @@ +monit diff --git a/alert/default/run b/alert/default/run @@ -0,0 +1,2 @@ +#!/usr/bin/env execlineb + diff --git a/alert/default/type b/alert/default/type @@ -0,0 +1 @@ +longrun diff --git a/axfrdns/default/env/ROOT b/axfrdns/default/env/ROOT @@ -0,0 +1 @@ +./data/ diff --git a/axfrdns/default/env/USER b/axfrdns/default/env/USER @@ -0,0 +1 @@ +dns diff --git a/axfrdns/default/run b/axfrdns/default/run @@ -0,0 +1,12 @@ +#!/usr/bin/env execlineb +fdmove -c 2 1 +s6-envdir env + +multisubstitute { + importas USER USER +} + +s6-envuidgid ${USER} +s6-softliimt 300000 +s6-tcpserver -vDRHl0 0.0.0.0 53 +axrfdns diff --git a/axfrdns/default/type b/axfrdns/default/type @@ -0,0 +1 @@ +longrun diff --git a/baresip/default/conf/config/audio_alert b/baresip/default/conf/config/audio_alert @@ -0,0 +1 @@ +alsa,default diff --git a/baresip/default/conf/config/audio_player b/baresip/default/conf/config/audio_player @@ -0,0 +1 @@ +alsa,default diff --git a/baresip/default/conf/config/audio_source b/baresip/default/conf/config/audio_source @@ -0,0 +1 @@ +alsa,default diff --git a/baresip/default/conf/config/cons_listen b/baresip/default/conf/config/cons_listen @@ -0,0 +1 @@ +0.0.0.0:5555 diff --git a/baresip/default/conf/config/ice_debug b/baresip/default/conf/config/ice_debug @@ -0,0 +1 @@ +yes diff --git a/baresip/default/conf/config/ice_mode b/baresip/default/conf/config/ice_mode @@ -0,0 +1 @@ +full diff --git a/baresip/default/conf/config/ice_nomination b/baresip/default/conf/config/ice_nomination @@ -0,0 +1 @@ +regular diff --git a/baresip/default/conf/config/ice_turn b/baresip/default/conf/config/ice_turn @@ -0,0 +1 @@ +yes diff --git a/baresip/default/conf/contacts/echo@creytiv.com b/baresip/default/conf/contacts/echo@creytiv.com @@ -0,0 +1 @@ +Echo Server diff --git a/baresip/default/conf/contacts/sip904@mouselike.org b/baresip/default/conf/contacts/sip904@mouselike.org @@ -0,0 +1 @@ +Echo and audio quality tests sip:904@mouselike.org or PSTN:+441483604781 – Allows test / connection from anywhere. diff --git a/baresip/default/conf/modules/x b/baresip/default/conf/modules/x @@ -0,0 +1,11 @@ +module cons.so + +module stun.so +module turn.so +module ice.so + +module account.so + +module_app auloop.so +module_app contact.so +module_app menu.so diff --git a/baresip/default/env/USER b/baresip/default/env/USER @@ -0,0 +1 @@ +sip diff --git a/baresip/default/run b/baresip/default/run @@ -0,0 +1,4 @@ +#!/usr/bin/env execlineb +fdmove -c 2 1 + +baresip -v -f data diff --git a/baresip/default/setup b/baresip/default/setup @@ -0,0 +1,68 @@ +#!/usr/bin/env execlineb + +if { mkdir -p data } + +# contacts +if { + redirfd -w 1 data/contacts + cd conf/contacts + + forbacktickx -n -o 0 x { ls } + importas contact x + + redirfd -r 0 ${contact} + withstdinas -n x + importas comment x + + echo "\"${comment}\" <sip:${contact}>" +} + +# accounts +if { + redirfd -w 1 data/accounts + cd conf/accounts + + forbacktickx -n -o 0 x { ls } + importas account x + cd ${account} + + if { redirfd -w 1 auth_pass pass sip/${account} } + + ifte { echo } { exit 1 } + if { printf "<sip:%s>" ${account} } + + forbacktickx -n -o 0 x { ls } + importas var x + + redirfd -r 0 ${var} + withstdinas -n x + importas value x + + printf ";%s=%s" ${var} ${value} +} + +redirfd -w 1 data/config + +# configuration +if { + cd conf/config + + forbacktickx -n -o 0 x { ls } + importas variable x + + redirfd -r 0 ${variable} + withstdinas -n x + importas value x + + printf "%-20s %s\n" ${variable} ${value} +} + +if { echo } + +# modules +if { + cd conf/modules + + elglob x * sed "s/#.*//; s/ *$//; /^$/d" ${x} + +} diff --git a/baresip/default/type b/baresip/default/type @@ -0,0 +1 @@ +longrun diff --git a/baresip/iptel.org/conf/accounts/josuah@iptel.org/auth_user b/baresip/iptel.org/conf/accounts/josuah@iptel.org/auth_user @@ -0,0 +1 @@ +josuah diff --git a/baresip/iptel.org/conf/accounts/josuah@iptel.org/medianat b/baresip/iptel.org/conf/accounts/josuah@iptel.org/medianat @@ -0,0 +1 @@ +ice diff --git a/baresip/iptel.org/conf/accounts/josuah@iptel.org/outbound b/baresip/iptel.org/conf/accounts/josuah@iptel.org/outbound @@ -0,0 +1 @@ +sip:iptel.org diff --git a/baresip/iptel.org/conf/accounts/josuah@iptel.org/stunserver b/baresip/iptel.org/conf/accounts/josuah@iptel.org/stunserver @@ -0,0 +1 @@ +stun:stun.3clogic.com:3478 diff --git a/baresip/linphone.org/conf/accounts/josuah@sip.linphone.org/medianat b/baresip/linphone.org/conf/accounts/josuah@sip.linphone.org/medianat @@ -0,0 +1 @@ +ice diff --git a/baresip/linphone.org/conf/accounts/josuah@sip.linphone.org/stunserver b/baresip/linphone.org/conf/accounts/josuah@sip.linphone.org/stunserver @@ -0,0 +1 @@ +stun:josuah@stun.linphone.org diff --git a/baresip/linphone.org/conf/accounts/josuah@sip.linphone.org/transport b/baresip/linphone.org/conf/accounts/josuah@sip.linphone.org/transport @@ -0,0 +1 @@ +tls diff --git a/bird/default/run b/bird/default/run @@ -0,0 +1,5 @@ +#!/usr/bin/env execlineb +fdmove -c 2 1 + + +bird -f diff --git a/bird/default/type b/bird/default/type @@ -0,0 +1 @@ +longrun diff --git a/cherrymusic/default/run b/cherrymusic/default/run @@ -0,0 +1,7 @@ +#!/usr/bin/env execlineb +fdmove -c 2 1 + +python3.6 +/pack/src/cherrymusic/cherrymusic + --setup + --port 8080 diff --git a/cherrymusic/default/type b/cherrymusic/default/type @@ -0,0 +1 @@ +longrun diff --git a/collectd/default/conf/plugin/cpu/ReportByCpu b/collectd/default/conf/plugin/cpu/ReportByCpu @@ -0,0 +1 @@ +false diff --git a/collectd/default/conf/plugin/cpu/ReportByState b/collectd/default/conf/plugin/cpu/ReportByState @@ -0,0 +1 @@ +true diff --git a/collectd/default/conf/plugin/cpu/ReportGuestState b/collectd/default/conf/plugin/cpu/ReportGuestState @@ -0,0 +1 @@ +false diff --git a/collectd/default/conf/plugin/cpu/ReportNumCpu b/collectd/default/conf/plugin/cpu/ReportNumCpu @@ -0,0 +1 @@ +false diff --git a/collectd/default/conf/plugin/cpu/SubtractGuestState b/collectd/default/conf/plugin/cpu/SubtractGuestState @@ -0,0 +1 @@ +true diff --git a/collectd/default/conf/plugin/cpu/ValuesPercentage b/collectd/default/conf/plugin/cpu/ValuesPercentage @@ -0,0 +1 @@ +true diff --git a/collectd/default/conf/plugin/csv/DataDir b/collectd/default/conf/plugin/csv/DataDir @@ -0,0 +1 @@ +"/var/collectd" diff --git a/collectd/default/conf/plugin/df/FSType b/collectd/default/conf/plugin/df/FSType @@ -0,0 +1 @@ +"ext3" diff --git a/collectd/default/conf/plugin/df/IgnoreSelected b/collectd/default/conf/plugin/df/IgnoreSelected @@ -0,0 +1 @@ +false diff --git a/collectd/default/conf/plugin/df/ReportByDevice b/collectd/default/conf/plugin/df/ReportByDevice @@ -0,0 +1 @@ +false diff --git a/collectd/default/conf/plugin/df/ReportInodes b/collectd/default/conf/plugin/df/ReportInodes @@ -0,0 +1 @@ +false diff --git a/collectd/default/conf/plugin/df/ValuesAbsolute b/collectd/default/conf/plugin/df/ValuesAbsolute @@ -0,0 +1 @@ +true diff --git a/collectd/default/conf/plugin/df/ValuesPercentage b/collectd/default/conf/plugin/df/ValuesPercentage @@ -0,0 +1 @@ +false diff --git a/collectd/default/conf/plugin/disk/IgnoreSelected b/collectd/default/conf/plugin/disk/IgnoreSelected @@ -0,0 +1 @@ +false diff --git a/collectd/default/conf/plugin/disk/UdevNameAttr b/collectd/default/conf/plugin/disk/UdevNameAttr @@ -0,0 +1 @@ +"DEVNAME" diff --git a/collectd/default/conf/plugin/disk/UseBSDName b/collectd/default/conf/plugin/disk/UseBSDName @@ -0,0 +1 @@ +false diff --git a/collectd/default/conf/plugin/interface/IgnoreSelected b/collectd/default/conf/plugin/interface/IgnoreSelected @@ -0,0 +1 @@ +false diff --git a/collectd/default/conf/plugin/interface/ReportInactive b/collectd/default/conf/plugin/interface/ReportInactive @@ -0,0 +1 @@ +true diff --git a/collectd/default/conf/plugin/interface/UniqueName b/collectd/default/conf/plugin/interface/UniqueName @@ -0,0 +1 @@ +false diff --git a/collectd/default/conf/plugin/load/ReportRelative b/collectd/default/conf/plugin/load/ReportRelative @@ -0,0 +1 @@ +true diff --git a/collectd/default/conf/plugin/logfile/File b/collectd/default/conf/plugin/logfile/File @@ -0,0 +1 @@ +STDOUT diff --git a/collectd/default/conf/plugin/logfile/LogLevel b/collectd/default/conf/plugin/logfile/LogLevel @@ -0,0 +1 @@ +info diff --git a/collectd/default/conf/plugin/logfile/PrintSeverity b/collectd/default/conf/plugin/logfile/PrintSeverity @@ -0,0 +1 @@ +true diff --git a/collectd/default/conf/plugin/logfile/Timestamp b/collectd/default/conf/plugin/logfile/Timestamp @@ -0,0 +1 @@ +true diff --git a/collectd/default/conf/plugin/memory/ValuesAbsolute b/collectd/default/conf/plugin/memory/ValuesAbsolute @@ -0,0 +1 @@ +false diff --git a/collectd/default/conf/plugin/memory/ValuesPercentage b/collectd/default/conf/plugin/memory/ValuesPercentage @@ -0,0 +1 @@ +true diff --git a/collectd/default/conf/variable/AutoLoadPlugin b/collectd/default/conf/variable/AutoLoadPlugin @@ -0,0 +1 @@ +true diff --git a/collectd/default/conf/variable/FQDNLookup b/collectd/default/conf/variable/FQDNLookup @@ -0,0 +1 @@ +false diff --git a/collectd/default/conf/variable/Interval b/collectd/default/conf/variable/Interval @@ -0,0 +1 @@ +900 diff --git a/collectd/default/conf/variable/MaxReadInterval b/collectd/default/conf/variable/MaxReadInterval @@ -0,0 +1 @@ +86400 diff --git a/collectd/default/conf/variable/ReadThreads b/collectd/default/conf/variable/ReadThreads @@ -0,0 +1 @@ +5 diff --git a/collectd/default/conf/variable/Timeout b/collectd/default/conf/variable/Timeout @@ -0,0 +1 @@ +2 diff --git a/collectd/default/conf/variable/WriteQueueLimitHigh b/collectd/default/conf/variable/WriteQueueLimitHigh @@ -0,0 +1 @@ +1000000 diff --git a/collectd/default/conf/variable/WriteQueueLimitLow b/collectd/default/conf/variable/WriteQueueLimitLow @@ -0,0 +1 @@ +800000 diff --git a/collectd/default/conf/variable/WriteThreads b/collectd/default/conf/variable/WriteThreads @@ -0,0 +1 @@ +5 diff --git a/collectd/default/env/USER b/collectd/default/env/USER @@ -0,0 +1 @@ +monit diff --git a/collectd/default/run b/collectd/default/run @@ -0,0 +1,4 @@ +#!/usr/bin/env execlineb +fdmove -c 2 1 + +collectd -f -C /etc/collectd/conf diff --git a/collectd/default/setup b/collectd/default/setup @@ -0,0 +1,25 @@ +#!/usr/bin/env execlineb + +if { mkdir -p data } +redirfd -w 1 data/conf + +cd conf + +if { + cd variable + forbacktickx x { ls } importas variable x + redirfd -r 0 ${variable} withstdinas -n x importas value x + printf "%-20s %s\n" ${variable} ${value} +} + +if { + cd plugin + forbacktickx x { ls } importas plugin x + if { printf "\n<Plugin %s>\n" ${plugin} } + ifte { printf "</Plugin>\n" } { exit 1 } + + cd ${plugin} + forbacktickx x { ls } importas variable x + redirfd -r 0 ${variable} withstdinas -n x importas value x + printf "\t%-20s %s\n" ${variable} ${value} +} diff --git a/collectd/default/type b/collectd/default/type @@ -0,0 +1 @@ +longrun diff --git a/collectd/josuah.net/conf/plug/df/Device b/collectd/josuah.net/conf/plug/df/Device @@ -0,0 +1 @@ +"/dev/hda1" diff --git a/collectd/josuah.net/conf/plug/df/MountPoint b/collectd/josuah.net/conf/plug/df/MountPoint @@ -0,0 +1 @@ +"/data" diff --git a/collectd/josuah.net/conf/plug/disk/Disk b/collectd/josuah.net/conf/plug/disk/Disk @@ -0,0 +1 @@ +"/^[hs]d[a-f][0-9]?$/" diff --git a/collectd/josuah.net/conf/plug/interface/Interface b/collectd/josuah.net/conf/plug/interface/Interface @@ -0,0 +1 @@ +"eth0" diff --git a/collectd/josuah.net/conf/variable/Hostname b/collectd/josuah.net/conf/variable/Hostname @@ -0,0 +1 @@ +"josuah.net" diff --git a/curvevpn/client/env/EXT b/curvevpn/client/env/EXT @@ -0,0 +1 @@ +00000000000000000000000000000000 diff --git a/curvevpn/client/env/IP b/curvevpn/client/env/IP @@ -0,0 +1 @@ +127.0.0.1 diff --git a/curvevpn/client/env/NAME b/curvevpn/client/env/NAME @@ -0,0 +1 @@ +vpn.josuah.net diff --git a/curvevpn/client/env/PORT b/curvevpn/client/env/PORT @@ -0,0 +1 @@ +1665 diff --git a/curvevpn/client/env/PUBKEY b/curvevpn/client/env/PUBKEY @@ -0,0 +1 @@ +0000000000000000000000000000000000000000000000000000000000000000 diff --git a/curvevpn/client/env/ROOT b/curvevpn/client/env/ROOT @@ -0,0 +1 @@ +. diff --git a/curvevpn/client/env/SERVER b/curvevpn/client/env/SERVER @@ -0,0 +1 @@ +IP+ \ No newline at end of file diff --git a/curvevpn/client/run b/curvevpn/client/run @@ -0,0 +1,13 @@ +#!/usr/bin/env execlineb +fdmove -c 2 1 +s6-envdir env + +multisubstitute { + importas NAME NAME + importas PUBKEY PUBKEY + importas IP IP + importas PORT PORT + importas EXT EXT +} + +curvevpn-client $NAME $PUBKEY $IP $PORT $EXT curvevpn diff --git a/curvevpn/client/type b/curvevpn/client/type @@ -0,0 +1 @@ +longrun diff --git a/curvevpn/default/data/data b/curvevpn/default/data/data @@ -0,0 +1,13 @@ +# -- EXAMPLE ------------------------------------------------------------------------------------------------------------------ +# #defaut routes +# r::192.168.0.0:255.255.0.0 +# r::10.2.0.0:255.255.0.0 +# r::172.16.85.0:255.255.255.0 +# +# #IP address for the first user with public key 84fb6a942b1bcddff2cfd231d012d5d586b710ff180b6841da721eea5ee4004e +# i:84fb6a942b1bcddff2cfd231d012d5d586b710ff180b6841da721eea5ee4004e:172.16.85.3:172.16.85.4 +# +# #IP address for the second user with public key 68585b65041498f7b9f300ef890169cbc4b55927e9d15f9b3651109f338bf35e + extra route +# i:68585b65041498f7b9f300ef890169cbc4b55927e9d15f9b3651109f338bf35e:172.16.85.5:172.16.85.6 +# r:68585b65041498f7b9f300ef890169cbc4b55927e9d15f9b3651109f338bf35e:10.0.0.0:255.255.0.0 +# -- EXAMPLE ------------------------------------------------------------------------------------------------------------------ diff --git a/curvevpn/default/env/EXT b/curvevpn/default/env/EXT @@ -0,0 +1 @@ +00000000000000000000000000000000 diff --git a/curvevpn/default/env/NAME b/curvevpn/default/env/NAME @@ -0,0 +1 @@ +vpn.josuah.net diff --git a/curvevpn/default/env/PORT b/curvevpn/default/env/PORT @@ -0,0 +1 @@ +1665 diff --git a/curvevpn/default/env/ROOT b/curvevpn/default/env/ROOT @@ -0,0 +1 @@ +data diff --git a/curvevpn/default/env/USER b/curvevpn/default/env/USER @@ -0,0 +1 @@ +vpn diff --git a/curvevpn/default/setup b/curvevpn/default/setup @@ -0,0 +1,3 @@ +#!/usr/bin/env execline +if { cd data curvevpn-data } +if { curvevpn-makekey key } diff --git a/curvevpn/default/type b/curvevpn/default/type @@ -0,0 +1 @@ +longrun diff --git a/curvevpn/server/env/BIND b/curvevpn/server/env/BIND @@ -0,0 +1 @@ +0.0.0.0 diff --git a/curvevpn/server/run b/curvevpn/server/run @@ -0,0 +1,17 @@ +#!/usr/bin/env execlineb +fdmove -c 2 1 +s6-envdir env + +multisubstitute { + importas NAME NAME + importas IP IP + importas PORT PORT + importas BASE BASE + importas EXT EXT +} + +cd $BASE +if { rm -f lock/???????????????????????????????????????????????????????????????? } +curvevpn-server $NAME data/key $IP $PORT $EXT +curvevpn-message +curvevpn -s ................................................................ diff --git a/dirmngr/default/run b/dirmngr/default/run @@ -0,0 +1,15 @@ +#!/usr/bin/env execlineb +fdmove -c 2 1 + +multisubstitute { + importas USER USER +} + +backtick -n HOME { homeof ${USER} } +importas HOME HOME + +s6-setuidgid ${USER} + +s6-ipcserver-socketbinder -d -a 0700 "${HOME}/.gnupg/S.dirmngr" +fdmove -c 3 0 +dirmngr -vv --supervised diff --git a/dirmngr/default/type b/dirmngr/default/type @@ -0,0 +1 @@ +longrun diff --git a/dirmngr/josuah/env/USER b/dirmngr/josuah/env/USER @@ -0,0 +1 @@ +josuah diff --git a/dirmngr/root/env/USER b/dirmngr/root/env/USER @@ -0,0 +1 @@ +root diff --git a/dnscache/default/data/ip/127.0.0.1 b/dnscache/default/data/ip/127.0.0.1 diff --git a/dnscache/default/data/servers/@ b/dnscache/default/data/servers/@ diff --git a/dnscache/default/env/CACHESIZE b/dnscache/default/env/CACHESIZE @@ -0,0 +1 @@ +1000000 diff --git a/dnscache/default/env/DATALIMIT b/dnscache/default/env/DATALIMIT @@ -0,0 +1 @@ +3000000 diff --git a/dnscache/default/env/IP b/dnscache/default/env/IP @@ -0,0 +1 @@ +127.0.0.1 diff --git a/dnscache/default/env/IPSEND b/dnscache/default/env/IPSEND @@ -0,0 +1 @@ +0.0.0.0 diff --git a/dnscache/default/env/ROOT b/dnscache/default/env/ROOT @@ -0,0 +1 @@ +./data/ diff --git a/dnscache/default/env/USER b/dnscache/default/env/USER @@ -0,0 +1 @@ +dns diff --git a/dnscache/default/run b/dnscache/default/run @@ -0,0 +1,12 @@ +#!/usr/bin/env execlineb +fdmove -c 2 1 +s6-envdir env + +multisubstitute { + importas DATALIMIT DATALIMIT +} + +s6-envguid dns +s6-softlimit -o 250 -d ${DATALIMIT} +pipeline { dd if=/dev/random } +dnscache diff --git a/dnscache/default/type b/dnscache/default/type @@ -0,0 +1 @@ +longrun diff --git a/ffingerd/default/env/BIND b/ffingerd/default/env/BIND @@ -0,0 +1 @@ +0.0.0.0 diff --git a/ffingerd/default/env/PORT b/ffingerd/default/env/PORT @@ -0,0 +1 @@ +79 diff --git a/ffingerd/default/env/USER b/ffingerd/default/env/USER @@ -0,0 +1 @@ +finger diff --git a/ffingerd/default/run b/ffingerd/default/run @@ -0,0 +1,13 @@ +#!/usr/bin/env execlineb +fdmove -c 2 1 +s6-envdir env + +multisubstitute { + importas BIND BIND + importas PORT PORT + importas USER USER +} + +s6-envuidgid ${USER} +s6-tcpserver -U ${BIND} ${PORT} +ffingerd diff --git a/ffingerd/default/type b/ffingerd/default/type @@ -0,0 +1 @@ +longrun diff --git a/fossil/default/env/PORT_A b/fossil/default/env/PORT_A @@ -0,0 +1 @@ +17034 diff --git a/fossil/default/env/PORT_H b/fossil/default/env/PORT_H @@ -0,0 +1 @@ +8080 diff --git a/fossil/default/env/ROOT b/fossil/default/env/ROOT @@ -0,0 +1 @@ +/var/venti diff --git a/fossil/default/env/USER b/fossil/default/env/USER @@ -0,0 +1 @@ +9p diff --git a/fossil/default/run b/fossil/default/run @@ -0,0 +1,15 @@ +#!/usr/bin/env execlineb +fdmove -c 2 1 +s6-envdir env + +multisubstitute { + importas ROOT ROOT + importas PORT_A PORT_A + importas PORT_H PORT_H +} + +cd ${ROOT} +fossil -s + -c data/conf + -a tcp!*!${PORT_A} + -h tcp!*!${PORT_H} diff --git a/fossil/default/type b/fossil/default/type @@ -0,0 +1 @@ +longrun diff --git a/geomyidae/default/env/BIND b/geomyidae/default/env/BIND @@ -0,0 +1 @@ +josuah.net diff --git a/geomyidae/default/env/PORT b/geomyidae/default/env/PORT @@ -0,0 +1 @@ +70 diff --git a/geomyidae/default/env/ROOT b/geomyidae/default/env/ROOT @@ -0,0 +1 @@ +/var/gopher diff --git a/geomyidae/default/env/USER b/geomyidae/default/env/USER @@ -0,0 +1 @@ +gopher diff --git a/geomyidae/default/run b/geomyidae/default/run @@ -0,0 +1,12 @@ +#!/usr/bin/env execlineb +fdmove -c 2 1 +s6-envdir env + +multisubstitute { + importas BIND BIND + importas PORT PORT + importas ROOT ROOT + importas IPV IPV +} + +geomyidae -d -b ${ROOT} -h ${BIND} -p ${PORT} -${IPV} diff --git a/geomyidae/default/type b/geomyidae/default/type @@ -0,0 +1 @@ +longrun diff --git a/geomyidae/ipv4/env/IPV b/geomyidae/ipv4/env/IPV @@ -0,0 +1 @@ +4 diff --git a/geomyidae/ipv6/env/IPV b/geomyidae/ipv6/env/IPV @@ -0,0 +1 @@ +6 diff --git a/git-daemon/default/env/BIND b/git-daemon/default/env/BIND @@ -0,0 +1 @@ +0.0.0.0 diff --git a/git-daemon/default/env/PORT b/git-daemon/default/env/PORT @@ -0,0 +1 @@ +9418 diff --git a/git-daemon/default/env/ROOT b/git-daemon/default/env/ROOT @@ -0,0 +1 @@ +/var/git diff --git a/git-daemon/default/env/USER b/git-daemon/default/env/USER @@ -0,0 +1 @@ +git diff --git a/git-daemon/default/run b/git-daemon/default/run @@ -0,0 +1,12 @@ +#!/usr/bin/env execlineb +fdmove -c 2 1 +s6-envdir env + +multisubstitute { + importas BIND BIND + importas PORT PORT + importas ROOT ROOT +} + +s6-tcpserver ${BIND} ${PORT} +git daemon --inetd --base-path=${ROOT} diff --git a/git-daemon/default/type b/git-daemon/default/type @@ -0,0 +1 @@ +longrun diff --git a/git-mirror/default/data/mirror b/git-mirror/default/data/mirror @@ -0,0 +1,3 @@ +git://git.josuah.net/code +git://git.josuah.net/dot +git://git.josuah.net/pk diff --git a/git-mirror/default/env/GIT b/git-mirror/default/env/GIT @@ -0,0 +1 @@ +/var/git diff --git a/git-mirror/default/env/USER b/git-mirror/default/env/USER @@ -0,0 +1 @@ +git diff --git a/git-mirror/default/run b/git-mirror/default/run @@ -0,0 +1,12 @@ +#!/usr/bin/env execlineb +fdmove -c 2 1 +s6-envdir env + +multisubstitute { + importas GITDIR GITDIR +} + +snooze -H * -M /15 +forbacktickx -n x { s6-ls ${GIT} } +importas x x +git -C ${GITDIR}/${x} fetch --all --verbose diff --git a/gpg-agent/default/run b/gpg-agent/default/run @@ -0,0 +1,15 @@ +#!/usr/bin/env execlineb +fdmove -c 2 1 + +multisubstitute { + importas USER USER +} + +backtick -n HOME { homeof ${USER} } +importas HOME HOME + +s6-setuidgid ${USER} + +s6-ipcserver-socketbinder -d -a 0700 "${HOME}/.gnupg/S.gpg-agent" +fdmove -c 3 0 +gpg-agent -vv --supervised diff --git a/gpg-agent/default/type b/gpg-agent/default/type @@ -0,0 +1 @@ +longrun diff --git a/gpg-agent/josuah/env/USER b/gpg-agent/josuah/env/USER @@ -0,0 +1 @@ +josuah diff --git a/gpg-agent/root/env/USER b/gpg-agent/root/env/USER @@ -0,0 +1 @@ +root diff --git a/host/default/type b/host/default/type @@ -0,0 +1 @@ +bundle diff --git a/host/kuntur/contents b/host/kuntur/contents @@ -0,0 +1,10 @@ +geomyidae,ipv4,x +geomyidae,ipv6,x +git-daemon,x +httpfile,tcp,x +httpfile,tls,h-o.st,x +qmail-smtpd,tcp,josuah.net,x +qmail-smtpd,tls,josuah.net,x +qmail-send,josuah.net,x +tinysshd,x +transmission,x diff --git a/httpfile/default/env/ACCESSFILE b/httpfile/default/env/ACCESSFILE @@ -0,0 +1 @@ +/var/www/access.cdb diff --git a/httpfile/default/env/BIND b/httpfile/default/env/BIND @@ -0,0 +1 @@ +0.0.0.0 diff --git a/httpfile/default/env/ROOT b/httpfile/default/env/ROOT @@ -0,0 +1 @@ +/var/httpfile diff --git a/httpfile/default/env/USER b/httpfile/default/env/USER @@ -0,0 +1 @@ +www diff --git a/httpfile/default/setup b/httpfile/default/setup @@ -0,0 +1,7 @@ +#!/usr/bin/env execlineb +s6-envdir env multisubstitute { + importas ROOT ROOT +} + +redirfd -r 0 ${ROOT}/access.txt +httpfile-access ${ROOT}/access.cdb ${ROOT}/access.tmp diff --git a/httpfile/default/type b/httpfile/default/type @@ -0,0 +1 @@ +longrun diff --git a/httpfile/h-o.st/env/CERTFILE b/httpfile/h-o.st/env/CERTFILE @@ -0,0 +1 @@ +/etc/ssl/josuah.net/cert.pem diff --git a/httpfile/h-o.st/env/KEYFILE b/httpfile/h-o.st/env/KEYFILE @@ -0,0 +1 @@ +/etc/ssl/josuah.net/privkey.pem diff --git a/httpfile/tcp/env/PORT b/httpfile/tcp/env/PORT @@ -0,0 +1 @@ +80 diff --git a/httpfile/tcp/run b/httpfile/tcp/run @@ -0,0 +1,13 @@ +#!/usr/bin/env execlineb +fdmove -c 2 1 +s6-envdir env + +multisubstitute { + importas BIND BIND + importas PORT PORT + importas USER USER +} + +s6-envuidgid $USER +s6-tcpserver -vD -b50 -c100 $BIND $PORT +httpfile-httpd diff --git a/httpfile/tls/env/CERTFILE b/httpfile/tls/env/CERTFILE @@ -0,0 +1 @@ +/etc/ssl/josuah.net/cert.pem diff --git a/httpfile/tls/env/KEYFILE b/httpfile/tls/env/KEYFILE @@ -0,0 +1 @@ +/etc/ssl/josuah.net/privkey.pem diff --git a/httpfile/tls/env/PORT b/httpfile/tls/env/PORT @@ -0,0 +1 @@ +443 diff --git a/httpfile/tls/run b/httpfile/tls/run @@ -0,0 +1,16 @@ +#!/usr/bin/env execlineb +fdmove -c 2 1 +s6-envdir env + +multisubstitute { + importas ACCESSFILE ACCESSFILE + importas BIND BIND + importas PORT PORT + importas USER USER +} + +s6-envuidgid $USER +unexport ACCESSFILE +s6-tlsserver -vD -b50 -c100 $BIND $PORT +export ACCESSFILE $ACCESSFILE +httpfile-httpd diff --git a/ii/default/env/ROOT b/ii/default/env/ROOT @@ -0,0 +1 @@ +. diff --git a/ii/default/env/USER b/ii/default/env/USER @@ -0,0 +1 @@ +irc diff --git a/ii/default/finish b/ii/default/finish @@ -0,0 +1,2 @@ +#!/usr/bin/env execlineb +sleep 30 diff --git a/ii/default/setup b/ii/default/setup @@ -0,0 +1,10 @@ +#!/usr/bin/env execlineb + +s6-envdir env +multisubstitute { + importas -i host HOST + importas -i nick NICK +} + +redirfd -w 1 env/PASS +pass irc/${host}/${nick} diff --git a/ii/default/timeout-finish b/ii/default/timeout-finish @@ -0,0 +1 @@ +300000 diff --git a/ii/default/type b/ii/default/type @@ -0,0 +1 @@ +longrun diff --git a/ii/irc.cyberia.is/env/HOST b/ii/irc.cyberia.is/env/HOST @@ -0,0 +1 @@ +irc.cyberia.is diff --git a/ii/irc.cyberia.is/env/NAME b/ii/irc.cyberia.is/env/NAME @@ -0,0 +1 @@ +jost + ii diff --git a/ii/irc.cyberia.is/env/NICK b/ii/irc.cyberia.is/env/NICK @@ -0,0 +1 @@ +iiost diff --git a/ii/irc.epitech.eu/env/HOST b/ii/irc.epitech.eu/env/HOST @@ -0,0 +1 @@ +irc.epitech.eu diff --git a/ii/irc.epitech.eu/env/NAME b/ii/irc.epitech.eu/env/NAME @@ -0,0 +1 @@ +josuah + ii diff --git a/ii/irc.epitech.eu/env/NICK b/ii/irc.epitech.eu/env/NICK @@ -0,0 +1 @@ +iiosuah diff --git a/ii/irc.freenode.net/env/HOST b/ii/irc.freenode.net/env/HOST @@ -0,0 +1 @@ +irc.freenode.net diff --git a/ii/irc.freenode.net/env/NAME b/ii/irc.freenode.net/env/NAME @@ -0,0 +1 @@ +josuah + ii diff --git a/ii/irc.freenode.net/env/NICK b/ii/irc.freenode.net/env/NICK @@ -0,0 +1 @@ +iiosuah diff --git a/ii/irc.h-o.st/env/HOST b/ii/irc.h-o.st/env/HOST @@ -0,0 +1 @@ +irc.h-o.st diff --git a/ii/irc.h-o.st/env/NAME b/ii/irc.h-o.st/env/NAME @@ -0,0 +1 @@ +jost + ii diff --git a/ii/irc.h-o.st/env/NICK b/ii/irc.h-o.st/env/NICK @@ -0,0 +1 @@ +iiost diff --git a/ii/irc.oftc.net/env/HOST b/ii/irc.oftc.net/env/HOST @@ -0,0 +1 @@ +irc.oftc.net diff --git a/ii/irc.oftc.net/env/NAME b/ii/irc.oftc.net/env/NAME @@ -0,0 +1 @@ +josuah + ii diff --git a/ii/irc.oftc.net/env/NICK b/ii/irc.oftc.net/env/NICK @@ -0,0 +1 @@ +iiosuah diff --git a/ii/monit-bot/env/HOST b/ii/monit-bot/env/HOST @@ -0,0 +1 @@ +josuah.net diff --git a/ii/monit-bot/env/NAME b/ii/monit-bot/env/NAME @@ -0,0 +1 @@ +Bot that sends alerts diff --git a/ii/monit-bot/env/NICK b/ii/monit-bot/env/NICK @@ -0,0 +1 @@ +iiost-bot diff --git a/ii/monit-bot/env/ROOT b/ii/monit-bot/env/ROOT @@ -0,0 +1 @@ +. diff --git a/ii/tcp/env/PORT b/ii/tcp/env/PORT @@ -0,0 +1 @@ +6667 diff --git a/ii/tcp/run b/ii/tcp/run @@ -0,0 +1,19 @@ +#!/usr/bin/env execlineb +fdmove -c 2 1 +s6-envdir env + +multisubstitute { + importas -i host HOST + importas -i port PORT + importas -i user USER + importas -i nick NICK + importas -i name NAME + importas -i root ROOT +} + +backtick -n x { homeof ${user} } +importas home x + +s6-setuidgid ${user} +s6-tcpclient ${host} ${port} +ii -i ${home}/${root} -s ${host} -n ${nick} -f ${name} -k PASS diff --git a/ii/tls/env/CAFILE b/ii/tls/env/CAFILE @@ -0,0 +1 @@ +cert.pem diff --git a/ii/tls/env/PORT b/ii/tls/env/PORT @@ -0,0 +1 @@ +6697 diff --git a/ii/tls/run b/ii/tls/run @@ -0,0 +1,26 @@ +#!/usr/bin/env execlineb +fdmove -c 2 1 +s6-envdir env + +multisubstitute { + importas -i host HOST + importas -i port PORT + importas -i user USER + importas -i nick NICK + importas -i name NAME + importas -i root ROOT + importas -i cafile CAFILE +} + +backtick -n x { homeof ${user} } +importas home x + +ifelse -n { test -f ${cafile} } { + redirfd -r 0 /dev/null + redirfd -w 1 ${cafile} + openssl s_client -showcerts -connect ${host}:${port} +} + +s6-setuidgid ${user} +s6-tlsclient ${host} ${port} +ii -i ${home}/${root} -s ${host} -n ${nick} -f ${name} -k PASS diff --git a/kamailio/default/conf/define/FLB_NATB b/kamailio/default/conf/define/FLB_NATB @@ -0,0 +1 @@ +6 diff --git a/kamailio/default/conf/define/FLB_NATSIPPING b/kamailio/default/conf/define/FLB_NATSIPPING @@ -0,0 +1 @@ +7 diff --git a/kamailio/default/conf/define/FLT_ACC b/kamailio/default/conf/define/FLT_ACC @@ -0,0 +1 @@ +1 diff --git a/kamailio/default/conf/define/FLT_ACCFAILED b/kamailio/default/conf/define/FLT_ACCFAILED @@ -0,0 +1 @@ +3 diff --git a/kamailio/default/conf/define/FLT_ACCMISSED b/kamailio/default/conf/define/FLT_ACCMISSED @@ -0,0 +1 @@ +2 diff --git a/kamailio/default/conf/define/FLT_NATS b/kamailio/default/conf/define/FLT_NATS @@ -0,0 +1 @@ +5 diff --git a/kamailio/default/conf/define/MULTIDOMAIN b/kamailio/default/conf/define/MULTIDOMAIN @@ -0,0 +1 @@ +0 diff --git a/kamailio/default/conf/modparam/acc/db_extra b/kamailio/default/conf/modparam/acc/db_extra @@ -0,0 +1 @@ +"src_user=$fU;src_domain=$fd;src_ip=$si;" "dst_ouser=$tU;dst_user=$rU;dst_domain=$rd" diff --git a/kamailio/default/conf/modparam/acc/db_flag b/kamailio/default/conf/modparam/acc/db_flag @@ -0,0 +1 @@ +FLT_ACC diff --git a/kamailio/default/conf/modparam/acc/db_missed_flag b/kamailio/default/conf/modparam/acc/db_missed_flag @@ -0,0 +1 @@ +FLT_ACCMISSED diff --git a/kamailio/default/conf/modparam/acc/db_url b/kamailio/default/conf/modparam/acc/db_url @@ -0,0 +1 @@ +DBURL diff --git a/kamailio/default/conf/modparam/acc/detect_direction b/kamailio/default/conf/modparam/acc/detect_direction @@ -0,0 +1 @@ +0 diff --git a/kamailio/default/conf/modparam/acc/early_media b/kamailio/default/conf/modparam/acc/early_media @@ -0,0 +1 @@ +0 diff --git a/kamailio/default/conf/modparam/acc/failed_transaction_flag b/kamailio/default/conf/modparam/acc/failed_transaction_flag @@ -0,0 +1 @@ +FLT_ACCFAILED diff --git a/kamailio/default/conf/modparam/acc/log_extra b/kamailio/default/conf/modparam/acc/log_extra @@ -0,0 +1 @@ +"src_user=$fU;src_domain=$fd;src_ip=$si;" "dst_ouser=$tU;dst_user=$rU;dst_domain=$rd" diff --git a/kamailio/default/conf/modparam/acc/log_flag b/kamailio/default/conf/modparam/acc/log_flag @@ -0,0 +1 @@ +FLT_ACC diff --git a/kamailio/default/conf/modparam/acc/log_missed_flag b/kamailio/default/conf/modparam/acc/log_missed_flag @@ -0,0 +1 @@ +FLT_ACCMISSED diff --git a/kamailio/default/conf/modparam/acc/report_ack b/kamailio/default/conf/modparam/acc/report_ack @@ -0,0 +1 @@ +0 diff --git a/kamailio/default/conf/modparam/acc/report_cancels b/kamailio/default/conf/modparam/acc/report_cancels @@ -0,0 +1 @@ +0 diff --git a/kamailio/default/conf/modparam/alias_db/db_url b/kamailio/default/conf/modparam/alias_db/db_url @@ -0,0 +1 @@ +DBURL diff --git a/kamailio/default/conf/modparam/alias_db/use_domain b/kamailio/default/conf/modparam/alias_db/use_domain @@ -0,0 +1 @@ +MULTIDOMAIN diff --git a/kamailio/default/conf/modparam/auth_db/calculate_ha1 b/kamailio/default/conf/modparam/auth_db/calculate_ha1 @@ -0,0 +1 @@ +yes diff --git a/kamailio/default/conf/modparam/auth_db/db_url b/kamailio/default/conf/modparam/auth_db/db_url @@ -0,0 +1 @@ +DBURL diff --git a/kamailio/default/conf/modparam/auth_db/load_credentials b/kamailio/default/conf/modparam/auth_db/load_credentials @@ -0,0 +1 @@ +"" diff --git a/kamailio/default/conf/modparam/auth_db/password_column b/kamailio/default/conf/modparam/auth_db/password_column @@ -0,0 +1 @@ +"password" diff --git a/kamailio/default/conf/modparam/auth_db/use_domain b/kamailio/default/conf/modparam/auth_db/use_domain @@ -0,0 +1 @@ +MULTIDOMAIN diff --git a/kamailio/default/conf/modparam/ctl/binrpc b/kamailio/default/conf/modparam/ctl/binrpc @@ -0,0 +1 @@ +"unix:/var/run/kamailio/kamailio_ctl" diff --git a/kamailio/default/conf/modparam/debugger/cfgtrace b/kamailio/default/conf/modparam/debugger/cfgtrace @@ -0,0 +1 @@ +1 diff --git a/kamailio/default/conf/modparam/debugger/log_level_name b/kamailio/default/conf/modparam/debugger/log_level_name @@ -0,0 +1 @@ +"exec" diff --git a/kamailio/default/conf/modparam/domain/db_url b/kamailio/default/conf/modparam/domain/db_url @@ -0,0 +1 @@ +DBURL diff --git a/kamailio/default/conf/modparam/domain/register_myself b/kamailio/default/conf/modparam/domain/register_myself @@ -0,0 +1 @@ +1 diff --git a/kamailio/default/conf/modparam/htable/htable b/kamailio/default/conf/modparam/htable/htable @@ -0,0 +1 @@ +"ipban=>size=8;autoexpire=300;" diff --git a/kamailio/default/conf/modparam/jsonrpcs/dgram_socket b/kamailio/default/conf/modparam/jsonrpcs/dgram_socket @@ -0,0 +1 @@ +"/var/run/kamailio/kamailio_rpc.sock" diff --git a/kamailio/default/conf/modparam/jsonrpcs/fifo_name b/kamailio/default/conf/modparam/jsonrpcs/fifo_name @@ -0,0 +1 @@ +"/var/run/kamailio/kamailio_rpc.fifo" diff --git a/kamailio/default/conf/modparam/jsonrpcs/pretty_format b/kamailio/default/conf/modparam/jsonrpcs/pretty_format @@ -0,0 +1 @@ +1 diff --git a/kamailio/default/conf/modparam/nathelper/natping_interval b/kamailio/default/conf/modparam/nathelper/natping_interval @@ -0,0 +1 @@ +30 diff --git a/kamailio/default/conf/modparam/nathelper/ping_nated_only b/kamailio/default/conf/modparam/nathelper/ping_nated_only @@ -0,0 +1 @@ +1 diff --git a/kamailio/default/conf/modparam/nathelper/sipping_bflag b/kamailio/default/conf/modparam/nathelper/sipping_bflag @@ -0,0 +1 @@ +FLB_NATSIPPING diff --git a/kamailio/default/conf/modparam/nathelper/sipping_from b/kamailio/default/conf/modparam/nathelper/sipping_from @@ -0,0 +1 @@ +"sip:pinger@kamailio.org" diff --git a/kamailio/default/conf/modparam/nathelper|registrar/received_avp b/kamailio/default/conf/modparam/nathelper|registrar/received_avp @@ -0,0 +1 @@ +"$avp(RECEIVED)" diff --git a/kamailio/default/conf/modparam/permissions/db_mode b/kamailio/default/conf/modparam/permissions/db_mode @@ -0,0 +1 @@ +1 diff --git a/kamailio/default/conf/modparam/permissions/db_url b/kamailio/default/conf/modparam/permissions/db_url @@ -0,0 +1 @@ +DBURL diff --git a/kamailio/default/conf/modparam/pike/remove_latency b/kamailio/default/conf/modparam/pike/remove_latency @@ -0,0 +1 @@ +4 diff --git a/kamailio/default/conf/modparam/pike/reqs_density_per_unit b/kamailio/default/conf/modparam/pike/reqs_density_per_unit @@ -0,0 +1 @@ +16 diff --git a/kamailio/default/conf/modparam/pike/sampling_time_unit b/kamailio/default/conf/modparam/pike/sampling_time_unit @@ -0,0 +1 @@ +2 diff --git a/kamailio/default/conf/modparam/registrar/append_branches b/kamailio/default/conf/modparam/registrar/append_branches @@ -0,0 +1 @@ +0 diff --git a/kamailio/default/conf/modparam/registrar/gruu_enabled b/kamailio/default/conf/modparam/registrar/gruu_enabled @@ -0,0 +1 @@ +0 diff --git a/kamailio/default/conf/modparam/registrar/max_contacts b/kamailio/default/conf/modparam/registrar/max_contacts @@ -0,0 +1 @@ +10 diff --git a/kamailio/default/conf/modparam/registrar/max_expires b/kamailio/default/conf/modparam/registrar/max_expires @@ -0,0 +1 @@ +3600 diff --git a/kamailio/default/conf/modparam/registrar/method_filtering b/kamailio/default/conf/modparam/registrar/method_filtering @@ -0,0 +1 @@ +1 diff --git a/kamailio/default/conf/modparam/rr/append_fromtag b/kamailio/default/conf/modparam/rr/append_fromtag @@ -0,0 +1 @@ +0 diff --git a/kamailio/default/conf/modparam/rr/enable_full_lr b/kamailio/default/conf/modparam/rr/enable_full_lr @@ -0,0 +1 @@ +0 diff --git a/kamailio/default/conf/modparam/rtpproxy/rtpproxy_sock b/kamailio/default/conf/modparam/rtpproxy/rtpproxy_sock @@ -0,0 +1 @@ +"udp:127.0.0.1:7722" diff --git a/kamailio/default/conf/modparam/speeddial/db_url b/kamailio/default/conf/modparam/speeddial/db_url @@ -0,0 +1 @@ +DBURL diff --git a/kamailio/default/conf/modparam/speeddial/use_domain b/kamailio/default/conf/modparam/speeddial/use_domain @@ -0,0 +1 @@ +MULTIDOMAIN diff --git a/kamailio/default/conf/modparam/tm/failure_reply_mode b/kamailio/default/conf/modparam/tm/failure_reply_mode @@ -0,0 +1 @@ +3 diff --git a/kamailio/default/conf/modparam/tm/fr_inv_timer b/kamailio/default/conf/modparam/tm/fr_inv_timer @@ -0,0 +1 @@ +120000 diff --git a/kamailio/default/conf/modparam/tm/fr_timer b/kamailio/default/conf/modparam/tm/fr_timer @@ -0,0 +1 @@ +30000 diff --git a/kamailio/default/conf/modparam/usrloc/db_mode b/kamailio/default/conf/modparam/usrloc/db_mode @@ -0,0 +1 @@ +2 diff --git a/kamailio/default/conf/modparam/usrloc/db_url b/kamailio/default/conf/modparam/usrloc/db_url @@ -0,0 +1 @@ +DBURL diff --git a/kamailio/default/conf/modparam/usrloc/nat_bflag b/kamailio/default/conf/modparam/usrloc/nat_bflag @@ -0,0 +1 @@ +FLB_NATB diff --git a/kamailio/default/conf/modparam/usrloc/use_domain b/kamailio/default/conf/modparam/usrloc/use_domain @@ -0,0 +1 @@ +MULTIDOMAIN diff --git a/kamailio/default/conf/module/acc b/kamailio/default/conf/module/acc @@ -0,0 +1 @@ +tm diff --git a/kamailio/default/conf/module/alias_db b/kamailio/default/conf/module/alias_db diff --git a/kamailio/default/conf/module/auth b/kamailio/default/conf/module/auth diff --git a/kamailio/default/conf/module/auth_db b/kamailio/default/conf/module/auth_db diff --git a/kamailio/default/conf/module/cfg_rpc b/kamailio/default/conf/module/cfg_rpc diff --git a/kamailio/default/conf/module/corex b/kamailio/default/conf/module/corex diff --git a/kamailio/default/conf/module/counters b/kamailio/default/conf/module/counters diff --git a/kamailio/default/conf/module/ctl b/kamailio/default/conf/module/ctl diff --git a/kamailio/default/conf/module/debugger b/kamailio/default/conf/module/debugger diff --git a/kamailio/default/conf/module/domain b/kamailio/default/conf/module/domain diff --git a/kamailio/default/conf/module/htable b/kamailio/default/conf/module/htable diff --git a/kamailio/default/conf/module/jsonrpcs b/kamailio/default/conf/module/jsonrpcs diff --git a/kamailio/default/conf/module/kex b/kamailio/default/conf/module/kex diff --git a/kamailio/default/conf/module/maxfwd b/kamailio/default/conf/module/maxfwd diff --git a/kamailio/default/conf/module/nathelper b/kamailio/default/conf/module/nathelper diff --git a/kamailio/default/conf/module/permissions b/kamailio/default/conf/module/permissions diff --git a/kamailio/default/conf/module/pike b/kamailio/default/conf/module/pike diff --git a/kamailio/default/conf/module/pv b/kamailio/default/conf/module/pv diff --git a/kamailio/default/conf/module/registrar b/kamailio/default/conf/module/registrar diff --git a/kamailio/default/conf/module/rr b/kamailio/default/conf/module/rr diff --git a/kamailio/default/conf/module/rtpproxy b/kamailio/default/conf/module/rtpproxy diff --git a/kamailio/default/conf/module/sanity b/kamailio/default/conf/module/sanity diff --git a/kamailio/default/conf/module/siputils b/kamailio/default/conf/module/siputils diff --git a/kamailio/default/conf/module/sl b/kamailio/default/conf/module/sl diff --git a/kamailio/default/conf/module/speeddial b/kamailio/default/conf/module/speeddial diff --git a/kamailio/default/conf/module/textops b/kamailio/default/conf/module/textops diff --git a/kamailio/default/conf/module/tm b/kamailio/default/conf/module/tm diff --git a/kamailio/default/conf/module/tmx b/kamailio/default/conf/module/tmx @@ -0,0 +1 @@ +tm diff --git a/kamailio/default/conf/module/usrloc b/kamailio/default/conf/module/usrloc @@ -0,0 +1 @@ +db_sqlite diff --git a/kamailio/default/conf/module/xlog b/kamailio/default/conf/module/xlog diff --git a/kamailio/default/conf/route/branch_route/MANAGE_BRANCH b/kamailio/default/conf/route/branch_route/MANAGE_BRANCH @@ -0,0 +1,4 @@ +# Manage outgoing branches + +xdbg("new branch [$T_branch_idx] to $ru\n"); +route(NATMANAGE); diff --git a/kamailio/default/conf/route/failure_route/MANAGE_FAILURE b/kamailio/default/conf/route/failure_route/MANAGE_FAILURE @@ -0,0 +1,31 @@ +# Manage failure routing cases + +route(NATMANAGE); + +if (t_is_canceled()) exit; + +#!ifdef WITH_BLOCK3XX +# block call redirect based on 3xx replies. +if (t_check_status("3[0-9][0-9]")) { + t_reply("404","Not found"); + exit; +} +#!endif + +#!ifdef WITH_BLOCK401407 +# block call redirect based on 401, 407 replies. +if (t_check_status("401|407")) { + t_reply("404","Not found"); + exit; +} +#!endif + +#!ifdef WITH_VOICEMAIL +# serial forking +# - route to voicemail on busy or no answer (timeout) +if (t_check_status("486|408")) { + $du = $null; + route(TOVOICEMAIL); + exit; +} +#!endif diff --git a/kamailio/default/conf/route/onreply_route/MANAGE_REPLY b/kamailio/default/conf/route/onreply_route/MANAGE_REPLY @@ -0,0 +1,6 @@ +# Manage incoming replies + +xdbg("incoming reply\n"); +if(status=~"[12][0-9][0-9]") { + route(NATMANAGE); +} diff --git a/kamailio/default/conf/route/route/0 b/kamailio/default/conf/route/route/0 @@ -0,0 +1,69 @@ +/* Main SIP request routing logic +* - processing of any incoming SIP request starts with this route +* - note: this is the same as route { ... } */ + +# per request initial checks +route(REQINIT); + +# NAT detection +route(NATDETECT); + +# CANCEL processing +if (is_method("CANCEL")) { + if (t_check_trans()) { + route(RELAY); + } + exit; +} + +# handle retransmissions +if (!is_method("ACK")) { + if(t_precheck_trans()) { + t_check_trans(); + exit; + } + t_check_trans(); +} + +# handle requests within SIP dialogs +route(WITHINDLG); + +### only initial requests (no To tag) + +# authentication +route(AUTH); + +# record routing for dialog forming requests (in case they are routed) +# - remove preloaded route headers +remove_hf("Route"); +if (is_method("INVITE|SUBSCRIBE")) { + record_route(); +} + +# account only INVITEs +if (is_method("INVITE")) { + setflag(FLT_ACC); # do accounting +} + +# dispatch requests to foreign domains +route(SIPOUT); + +### requests for my local domains + +# handle presence related requests +route(PRESENCE); + +# handle registrations +route(REGISTRAR); + +if ($rU==$null) { + # request with no Username in RURI + sl_send_reply("484","Address Incomplete"); + exit; +} + +# dispatch destinations to PSTN +route(PSTN); + +# user location service +route(LOCATION); diff --git a/kamailio/default/conf/route/route/AUTH b/kamailio/default/conf/route/route/AUTH @@ -0,0 +1,38 @@ +# IP authorization and user authentication + +#!ifdef WITH_AUTH + +#!ifdef WITH_IPAUTH +if((!is_method("REGISTER")) && allow_source_address()) { + # source IP allowed + return; +} +#!endif + +if (is_method("REGISTER") || from_uri==myself) { + # authenticate requests + if (!auth_check("$fd", "subscriber", "1")) { + auth_challenge("$fd", "0"); + exit; + } + # user authenticated - remove auth header + if(!is_method("REGISTER|PUBLISH")) + consume_credentials(); +} +# if caller is not local subscriber, then check if it calls +# a local destination, otherwise deny, not an open relay here +if (from_uri!=myself && uri!=myself) { + sl_send_reply("403","Not relaying"); + exit; +} + +#!else + +# authentication not enabled - do not relay at all to foreign networks +if(uri!=myself) { + sl_send_reply("403","Not relaying"); + exit; +} + +#!endif +return; diff --git a/kamailio/default/conf/route/route/DLGURI b/kamailio/default/conf/route/route/DLGURI @@ -0,0 +1,8 @@ +# URI update for dialog requests + +#!ifdef WITH_NAT +if(!isdsturiset()) { + handle_ruri_alias(); +} +#!endif +return; diff --git a/kamailio/default/conf/route/route/LOCATION b/kamailio/default/conf/route/route/LOCATION @@ -0,0 +1,41 @@ +# User location service + +#!ifdef WITH_SPEEDDIAL +# search for short dialing - 2-digit extension +if($rU=~"^[0-9][0-9]$") { + if(sd_lookup("speed_dial")) { + route(SIPOUT); + } +} +#!endif + +#!ifdef WITH_ALIASDB +# search in DB-based aliases +if(alias_db_lookup("dbaliases")) { + route(SIPOUT); +} +#!endif + +$avp(oexten) = $rU; +if (!lookup("location")) { + $var(rc) = $rc; + route(TOVOICEMAIL); + t_newtran(); + switch ($var(rc)) { + case -1: + case -3: + send_reply("404", "Not Found"); + exit; + case -2: + send_reply("405", "Method Not Allowed"); + exit; + } +} + +# when routing via usrloc, log the missed calls also +if (is_method("INVITE")) { + setflag(FLT_ACCMISSED); +} + +route(RELAY); +exit; diff --git a/kamailio/default/conf/route/route/NATDETECT b/kamailio/default/conf/route/route/NATDETECT @@ -0,0 +1,16 @@ +# Caller NAT detection + +#!ifdef WITH_NAT +force_rport(); +if (nat_uac_test("19")) { + if (is_method("REGISTER")) { + fix_nated_register(); + } else { + if(is_first_hop()) { + set_contact_alias(); + } + } + setflag(FLT_NATS); +} +#!endif +return; diff --git a/kamailio/default/conf/route/route/NATMANAGE b/kamailio/default/conf/route/route/NATMANAGE @@ -0,0 +1,33 @@ +# RTPProxy control and signaling updates for NAT traversal + +#!ifdef WITH_NAT +if (is_request()) { + if(has_totag()) { + if(check_route_param("nat=yes")) { + setbflag(FLB_NATB); + } + } +} +if (!(isflagset(FLT_NATS) || isbflagset(FLB_NATB))) return; + +if(nat_uac_test("8")) { + rtpproxy_manage("co"); +} else { + rtpproxy_manage("cor"); +} + +if (is_request()) { + if (!has_totag()) { + if(t_is_branch_route()) { + add_rr_param(";nat=yes"); + } + } +} +if (is_reply()) { + if(isbflagset(FLB_NATB)) { + if(is_first_hop()) + set_contact_alias(); + } +} +#!endif +return; diff --git a/kamailio/default/conf/route/route/PRESENCE b/kamailio/default/conf/route/route/PRESENCE @@ -0,0 +1,33 @@ +# Presence server processing + +if(!is_method("PUBLISH|SUBSCRIBE")) return; + +if(is_method("SUBSCRIBE") && $hdr(Event)=="message-summary") { + route(TOVOICEMAIL); + # returns here if no voicemail server is configured + sl_send_reply("404", "No voicemail service"); + exit; +} + +#!ifdef WITH_PRESENCE +if (!t_newtran()) { + sl_reply_error(); + exit; +} + +if(is_method("PUBLISH")) { + handle_publish(); + t_release(); +} else if(is_method("SUBSCRIBE")) { + handle_subscribe(); + t_release(); +} +exit; +#!endif + +# if presence enabled, this part will not be executed +if (is_method("PUBLISH") || $rU==$null) { + sl_send_reply("404", "Not here"); + exit; +} +return; diff --git a/kamailio/default/conf/route/route/PSTN b/kamailio/default/conf/route/route/PSTN @@ -0,0 +1,39 @@ +# PSTN GW routing + +#!ifdef WITH_PSTN +# check if PSTN GW IP is defined +if (strempty($sel(cfg_get.pstn.gw_ip))) { + xlog("SCRIPT: PSTN routing enabled but pstn.gw_ip not defined\n"); + return; +} + +# route to PSTN dialed numbers starting with "+" or "00" +# (international format) +# - update the condition to match your dialing rules for PSTN routing +if(!($rU=~"^(\+|00)[1-9][0-9]{3,20}$")) return; + +# only local users allowed to call +if(from_uri!=myself) { + sl_send_reply("403", "Not Allowed"); + exit; +} + +# normalize target number for pstn gateway +# - convert leading 00 to + +if (starts_with("$rU", "00")) { + strip(2); + prefix("+"); +} + +if (strempty($sel(cfg_get.pstn.gw_port))) { + $ru = "sip:" + $rU + "@" + $sel(cfg_get.pstn.gw_ip); +} else { + $ru = "sip:" + $rU + "@" + $sel(cfg_get.pstn.gw_ip) + ":" + + $sel(cfg_get.pstn.gw_port); +} + +route(RELAY); +exit; +#!endif + +return; diff --git a/kamailio/default/conf/route/route/REGISTRAR b/kamailio/default/conf/route/route/REGISTRAR @@ -0,0 +1,15 @@ +# Handle SIP registrations + +if (!is_method("REGISTER")) return; + +if(isflagset(FLT_NATS)) { + setbflag(FLB_NATB); +#!ifdef WITH_NATSIPPING + # do SIP NAT pinging + setbflag(FLB_NATSIPPING); +#!endif +} +if (!save("location")) { + sl_reply_error(); +} +exit; diff --git a/kamailio/default/conf/route/route/RELAY b/kamailio/default/conf/route/route/RELAY @@ -0,0 +1,18 @@ +# Wrapper for relaying requests + +# enable additional event routes for forwarded requests +# - serial forking, RTP relaying handling, a.s.o. +if (is_method("INVITE|BYE|SUBSCRIBE|UPDATE")) { + if(!t_is_set("branch_route")) t_on_branch("MANAGE_BRANCH"); +} +if (is_method("INVITE|SUBSCRIBE|UPDATE")) { + if(!t_is_set("onreply_route")) t_on_reply("MANAGE_REPLY"); +} +if (is_method("INVITE")) { + if(!t_is_set("failure_route")) t_on_failure("MANAGE_FAILURE"); +} + +if (!t_relay()) { + sl_reply_error(); +} +exit; diff --git a/kamailio/default/conf/route/route/REQINIT b/kamailio/default/conf/route/route/REQINIT @@ -0,0 +1,39 @@ +# Per SIP request initial checks + +#!ifdef WITH_ANTIFLOOD +# flood detection from same IP and traffic ban for a while +# be sure you exclude checking trusted peers, such as pstn gateways +# - local host excluded (e.g., loop to self) +if(src_ip!=myself) { + if($sht(ipban=>$si)!=$null) { + # ip is already blocked + xdbg("request from blocked IP - $rm from $fu (IP:$si:$sp)\n"); + exit; + } + if (!pike_check_req()) { + xlog("L_ALERT","ALERT: pike blocking $rm from $fu (IP:$si:$sp)\n"); + $sht(ipban=>$si) = 1; + exit; + } +} +#!endif +if($ua =~ "friendly-scanner|sipcli|VaxSIPUserAgent") { + # silent drop for scanners - uncomment next line if want to reply + # sl_send_reply("200", "OK"); + exit; +} + +if (!mf_process_maxfwd_header("10")) { + sl_send_reply("483","Too Many Hops"); + exit; +} + +if(is_method("OPTIONS") && uri==myself && $rU==$null) { + sl_send_reply("200","Keepalive"); + exit; +} + +if(!sanity_check("17895", "7")) { + xlog("Malformed SIP message from $si:$sp\n"); + exit; +} diff --git a/kamailio/default/conf/route/route/SIPOUT b/kamailio/default/conf/route/route/SIPOUT @@ -0,0 +1,7 @@ +# Routing to foreign domains + +if (uri==myself) return; + +append_hf("P-hint: outbound\r\n"); +route(RELAY); +exit; diff --git a/kamailio/default/conf/route/route/TOVOICEMAIL b/kamailio/default/conf/route/route/TOVOICEMAIL @@ -0,0 +1,26 @@ +# Routing to voicemail server + +#!ifdef WITH_VOICEMAIL +if(!is_method("INVITE|SUBSCRIBE")) return; + +# check if VoiceMail server IP is defined +if (strempty($sel(cfg_get.voicemail.srv_ip))) { + xlog("SCRIPT: VoiceMail routing enabled but IP not defined\n"); + return; +} +if(is_method("INVITE")) { + if($avp(oexten)==$null) return; + + $ru = "sip:" + $avp(oexten) + "@" + $sel(cfg_get.voicemail.srv_ip) + + ":" + $sel(cfg_get.voicemail.srv_port); +} else { + if($rU==$null) return; + + $ru = "sip:" + $rU + "@" + $sel(cfg_get.voicemail.srv_ip) + + ":" + $sel(cfg_get.voicemail.srv_port); +} +route(RELAY); +exit; +#!endif + +return; diff --git a/kamailio/default/conf/route/route/WITHINDLG b/kamailio/default/conf/route/route/WITHINDLG @@ -0,0 +1,41 @@ +# Handle requests within SIP dialogs + +if (!has_totag()) return; + +# sequential request withing a dialog should +# take the path determined by record-routing +if (loose_route()) { + route(DLGURI); + if (is_method("BYE")) { + setflag(FLT_ACC); # do accounting ... + setflag(FLT_ACCFAILED); # ... even if the transaction fails + } else if (is_method("ACK")) { + # ACK is forwarded statelessly + route(NATMANAGE); + } else if (is_method("NOTIFY")) { + # Add Record-Route for in-dialog NOTIFY as per RFC 6665. + record_route(); + } + route(RELAY); + exit; +} + +if (is_method("SUBSCRIBE") && uri == myself) { + # in-dialog subscribe requests + route(PRESENCE); + exit; +} +if (is_method("ACK")) { + if (t_check_trans()) { + # no loose-route, but stateful ACK; + # must be an ACK after a 487 + # or e.g. 404 from upstream server + route(RELAY); + exit; + } else { + # ACK without matching transaction ... ignore and discard + exit; + } +} +sl_send_reply("404","Not here"); +exit; diff --git a/kamailio/default/conf/setup-dep b/kamailio/default/conf/setup-dep @@ -0,0 +1,8 @@ +#!/usr/bin/env execlineb +elgetpositionals + +if -tn { test ${#} = 0 } +backtick x { cat ${@} } +importas -s -d "\n" dependencies x +if { ../../setup-dep ${dependencies} } +printf "%s\n" ${@} diff --git a/kamailio/default/conf/variable/children b/kamailio/default/conf/variable/children @@ -0,0 +1 @@ +8 diff --git a/kamailio/default/conf/variable/debug b/kamailio/default/conf/variable/debug @@ -0,0 +1 @@ +2 diff --git a/kamailio/default/conf/variable/enable_tls b/kamailio/default/conf/variable/enable_tls @@ -0,0 +1 @@ +yes diff --git a/kamailio/default/conf/variable/log_facility b/kamailio/default/conf/variable/log_facility @@ -0,0 +1 @@ +LOG_LOCAL0 diff --git a/kamailio/default/conf/variable/log_prefix b/kamailio/default/conf/variable/log_prefix @@ -0,0 +1 @@ +"{$mt $hdr(CSeq) $ci} " diff --git a/kamailio/default/conf/variable/log_stderror b/kamailio/default/conf/variable/log_stderror @@ -0,0 +1 @@ +no diff --git a/kamailio/default/conf/variable/memdbg b/kamailio/default/conf/variable/memdbg @@ -0,0 +1 @@ +5 diff --git a/kamailio/default/conf/variable/memlog b/kamailio/default/conf/variable/memlog @@ -0,0 +1 @@ +5 diff --git a/kamailio/default/conf/variable/pstn.gw_ip b/kamailio/default/conf/variable/pstn.gw_ip @@ -0,0 +1 @@ + "" desc "PSTN GW Address" diff --git a/kamailio/default/conf/variable/pstn.gw_port b/kamailio/default/conf/variable/pstn.gw_port @@ -0,0 +1 @@ + "" desc "PSTN GW Port" diff --git a/kamailio/default/conf/variable/tcp_connection_lifetime b/kamailio/default/conf/variable/tcp_connection_lifetime @@ -0,0 +1 @@ +3605 diff --git a/kamailio/default/conf/variable/voicemail.srv_ip b/kamailio/default/conf/variable/voicemail.srv_ip @@ -0,0 +1 @@ + "" desc "VoiceMail IP Address" diff --git a/kamailio/default/conf/variable/voicemail.srv_port b/kamailio/default/conf/variable/voicemail.srv_port @@ -0,0 +1 @@ + "5060" desc "VoiceMail Port" diff --git a/kamailio/default/env/BIND b/kamailio/default/env/BIND @@ -0,0 +1 @@ +0.0.0.0 diff --git a/kamailio/default/env/MODULES_DIR b/kamailio/default/env/MODULES_DIR @@ -0,0 +1 @@ +/var/pack/pkg/kamailio/5.2.0/lib64/kamailio/modules/ diff --git a/kamailio/default/env/USER b/kamailio/default/env/USER @@ -0,0 +1 @@ +kamailio diff --git a/kamailio/default/run b/kamailio/default/run @@ -0,0 +1,12 @@ +#!/usr/bin/env execlineb +fdmove -c 2 1 +s6-envdir env + +multisubstitute { + importas BIND BIND + importas MODULES_DIR MODULES_DIR + importas USER USER +} + +#s6-setuidgid ${USER} +kamailio -ED -f data/conf -l ${BIND} -L ${MODULES_DIR} diff --git a/kamailio/default/setup b/kamailio/default/setup @@ -0,0 +1,83 @@ +#!/usr/bin/env execlineb + +ifelse -n { test -f conf/define/DBURL } + { if { echo kamilio needs at least one database backend } exit 1 } + +if { mkdir -p data /var/kamailio /etc/kamailio } +if { elglob -0 x setup-* forx -o 0 x { ${x} } importas db x ./${db} } +if { chown -R kamailio /var/kamailio } + +redirfd -w 1 data/conf + +cd conf + +if { echo "# Kamailio configuration generated by ./setup" } + +if { + cd define + + if { echo } + + forbacktickx -n -o 0 x { ls } + importas define x + redirfd -r 0 ${define} withstdinas -n x + importas value x + + if { echo "#!define ${define} ${value}" } +} + +if { + cd variable + + if { echo } + + forbacktickx -n -o 0 x { ls } + importas variable x + redirfd -r 0 ${variable} withstdinas -n x + importas value x + + if { echo "${variable}=${value}" } +} + +if { + cd module + + if { echo } + + # resolve module dependency + pipeline { elglob -0 x * ../../setup-dep ${x} } + awk "! exist[$0]++ { print \"loadmodule \\\"\"$0\".so\\\"\"; }" +} + +if { + cd modparam + + if { echo } + + forbacktickx -n -o 0 x { ls } + importas module x + + cd ${module} + forbacktickx -n -o 0 x { ls } + importas param x + redirfd -r 0 ${param} withstdinas -n x + importas value x + + if { echo "modparam(\"${module}\", \"${param}\", ${value})" } +} + +if { + cd route + + forbacktickx -n -o 0 x { ls } + importas type x + + cd ${type} + forbacktickx -n -o 0 x { ls } + importas route x + + if { echo } + if { echo "${type}[\"${route}\"] {" } + if { sed "/^#!/ ! s/^./\t&/" ${route} } + if { echo "}" } +} diff --git a/kamailio/default/type b/kamailio/default/type @@ -0,0 +1 @@ +longrun diff --git a/kamailio/presence/conf/db/sqlite/presence-create.sql b/kamailio/presence/conf/db/sqlite/presence-create.sql @@ -0,0 +1,122 @@ +CREATE TABLE presentity ( + id INTEGER PRIMARY KEY NOT NULL, + username VARCHAR(64) NOT NULL, + domain VARCHAR(64) NOT NULL, + event VARCHAR(64) NOT NULL, + etag VARCHAR(128) NOT NULL, + expires INTEGER NOT NULL, + received_time INTEGER NOT NULL, + body BLOB NOT NULL, + sender VARCHAR(128) NOT NULL, + priority INTEGER DEFAULT 0 NOT NULL, + ruid VARCHAR(64), + CONSTRAINT presentity_presentity_idx UNIQUE (username, domain, event, etag), + CONSTRAINT presentity_ruid_idx UNIQUE (ruid) +); + +CREATE INDEX presentity_presentity_expires ON presentity (expires); +CREATE INDEX presentity_account_idx ON presentity (username, domain, event); + +INSERT INTO version (table_name, table_version) values ('presentity','5'); + +CREATE TABLE active_watchers ( + id INTEGER PRIMARY KEY NOT NULL, + presentity_uri VARCHAR(128) NOT NULL, + watcher_username VARCHAR(64) NOT NULL, + watcher_domain VARCHAR(64) NOT NULL, + to_user VARCHAR(64) NOT NULL, + to_domain VARCHAR(64) NOT NULL, + event VARCHAR(64) DEFAULT 'presence' NOT NULL, + event_id VARCHAR(64), + to_tag VARCHAR(64) NOT NULL, + from_tag VARCHAR(64) NOT NULL, + callid VARCHAR(255) NOT NULL, + local_cseq INTEGER NOT NULL, + remote_cseq INTEGER NOT NULL, + contact VARCHAR(128) NOT NULL, + record_route TEXT, + expires INTEGER NOT NULL, + status INTEGER DEFAULT 2 NOT NULL, + reason VARCHAR(64), + version INTEGER DEFAULT 0 NOT NULL, + socket_info VARCHAR(64) NOT NULL, + local_contact VARCHAR(128) NOT NULL, + from_user VARCHAR(64) NOT NULL, + from_domain VARCHAR(64) NOT NULL, + updated INTEGER NOT NULL, + updated_winfo INTEGER NOT NULL, + flags INTEGER DEFAULT 0 NOT NULL, + user_agent VARCHAR(255) DEFAULT '', + CONSTRAINT active_watchers_active_watchers_idx UNIQUE (callid, to_tag, from_tag) +); + +CREATE INDEX active_watchers_active_watchers_expires ON active_watchers (expires); +CREATE INDEX active_watchers_active_watchers_pres ON active_watchers (presentity_uri, event); +CREATE INDEX active_watchers_updated_idx ON active_watchers (updated); +CREATE INDEX active_watchers_updated_winfo_idx ON active_watchers (updated_winfo, presentity_uri); + +INSERT INTO version (table_name, table_version) values ('active_watchers','12'); + +CREATE TABLE watchers ( + id INTEGER PRIMARY KEY NOT NULL, + presentity_uri VARCHAR(128) NOT NULL, + watcher_username VARCHAR(64) NOT NULL, + watcher_domain VARCHAR(64) NOT NULL, + event VARCHAR(64) DEFAULT 'presence' NOT NULL, + status INTEGER NOT NULL, + reason VARCHAR(64), + inserted_time INTEGER NOT NULL, + CONSTRAINT watchers_watcher_idx UNIQUE (presentity_uri, watcher_username, watcher_domain, event) +); + +INSERT INTO version (table_name, table_version) values ('watchers','3'); + +CREATE TABLE xcap ( + id INTEGER PRIMARY KEY NOT NULL, + username VARCHAR(64) NOT NULL, + domain VARCHAR(64) NOT NULL, + doc BLOB NOT NULL, + doc_type INTEGER NOT NULL, + etag VARCHAR(128) NOT NULL, + source INTEGER NOT NULL, + doc_uri VARCHAR(255) NOT NULL, + port INTEGER NOT NULL, + CONSTRAINT xcap_doc_uri_idx UNIQUE (doc_uri) +); + +CREATE INDEX xcap_account_doc_type_idx ON xcap (username, domain, doc_type); +CREATE INDEX xcap_account_doc_type_uri_idx ON xcap (username, domain, doc_type, doc_uri); +CREATE INDEX xcap_account_doc_uri_idx ON xcap (username, domain, doc_uri); + +INSERT INTO version (table_name, table_version) values ('xcap','4'); + +CREATE TABLE pua ( + id INTEGER PRIMARY KEY NOT NULL, + pres_uri VARCHAR(128) NOT NULL, + pres_id VARCHAR(255) NOT NULL, + event INTEGER NOT NULL, + expires INTEGER NOT NULL, + desired_expires INTEGER NOT NULL, + flag INTEGER NOT NULL, + etag VARCHAR(128) NOT NULL, + tuple_id VARCHAR(64), + watcher_uri VARCHAR(128) NOT NULL, + call_id VARCHAR(255) NOT NULL, + to_tag VARCHAR(64) NOT NULL, + from_tag VARCHAR(64) NOT NULL, + cseq INTEGER NOT NULL, + record_route TEXT, + contact VARCHAR(128) NOT NULL, + remote_contact VARCHAR(128) NOT NULL, + version INTEGER NOT NULL, + extra_headers TEXT NOT NULL, + CONSTRAINT pua_pua_idx UNIQUE (etag, tuple_id, call_id, from_tag) +); + +CREATE INDEX pua_expires_idx ON pua (expires); +CREATE INDEX pua_dialog1_idx ON pua (pres_id, pres_uri); +CREATE INDEX pua_dialog2_idx ON pua (call_id, from_tag); +CREATE INDEX pua_record_idx ON pua (pres_id); + +INSERT INTO version (table_name, table_version) values ('pua','7'); + diff --git a/kamailio/presence/conf/modparam/presence/db_url b/kamailio/presence/conf/modparam/presence/db_url @@ -0,0 +1 @@ +DBURL diff --git a/kamailio/presence/conf/modparam/presence_xml/db_url b/kamailio/presence/conf/modparam/presence_xml/db_url @@ -0,0 +1 @@ +DBURL diff --git a/kamailio/presence/conf/modparam/presence_xml/force_active b/kamailio/presence/conf/modparam/presence_xml/force_active @@ -0,0 +1 @@ +1 diff --git a/kamailio/sqlite/conf/define/DBURL b/kamailio/sqlite/conf/define/DBURL @@ -0,0 +1 @@ +"sqlite:////var/kamailio/sqlite.db" diff --git a/kamailio/sqlite/conf/module/db_sqlite b/kamailio/sqlite/conf/module/db_sqlite diff --git a/kamailio/sqlite/conf/sqlite-extra/carrierroute-create.sql b/kamailio/sqlite/conf/sqlite-extra/carrierroute-create.sql @@ -0,0 +1,46 @@ +CREATE TABLE carrierroute ( + id INTEGER PRIMARY KEY NOT NULL, + carrier INTEGER DEFAULT 0 NOT NULL, + domain INTEGER DEFAULT 0 NOT NULL, + scan_prefix VARCHAR(64) DEFAULT '' NOT NULL, + flags INTEGER DEFAULT 0 NOT NULL, + mask INTEGER DEFAULT 0 NOT NULL, + prob REAL DEFAULT 0 NOT NULL, + strip INTEGER DEFAULT 0 NOT NULL, + rewrite_host VARCHAR(128) DEFAULT '' NOT NULL, + rewrite_prefix VARCHAR(64) DEFAULT '' NOT NULL, + rewrite_suffix VARCHAR(64) DEFAULT '' NOT NULL, + description VARCHAR(255) DEFAULT NULL +); + +INSERT INTO version (table_name, table_version) values ('carrierroute','3'); + +CREATE TABLE carrierfailureroute ( + id INTEGER PRIMARY KEY NOT NULL, + carrier INTEGER DEFAULT 0 NOT NULL, + domain INTEGER DEFAULT 0 NOT NULL, + scan_prefix VARCHAR(64) DEFAULT '' NOT NULL, + host_name VARCHAR(128) DEFAULT '' NOT NULL, + reply_code VARCHAR(3) DEFAULT '' NOT NULL, + flags INTEGER DEFAULT 0 NOT NULL, + mask INTEGER DEFAULT 0 NOT NULL, + next_domain INTEGER DEFAULT 0 NOT NULL, + description VARCHAR(255) DEFAULT NULL +); + +INSERT INTO version (table_name, table_version) values ('carrierfailureroute','2'); + +CREATE TABLE carrier_name ( + id INTEGER PRIMARY KEY NOT NULL, + carrier VARCHAR(64) DEFAULT NULL +); + +INSERT INTO version (table_name, table_version) values ('carrier_name','1'); + +CREATE TABLE domain_name ( + id INTEGER PRIMARY KEY NOT NULL, + domain VARCHAR(64) DEFAULT NULL +); + +INSERT INTO version (table_name, table_version) values ('domain_name','1'); + diff --git a/kamailio/sqlite/conf/sqlite-extra/cpl-create.sql b/kamailio/sqlite/conf/sqlite-extra/cpl-create.sql @@ -0,0 +1,11 @@ +CREATE TABLE cpl ( + id INTEGER PRIMARY KEY NOT NULL, + username VARCHAR(64) NOT NULL, + domain VARCHAR(64) DEFAULT '' NOT NULL, + cpl_xml TEXT, + cpl_bin TEXT, + CONSTRAINT cpl_account_idx UNIQUE (username, domain) +); + +INSERT INTO version (table_name, table_version) values ('cpl','1'); + diff --git a/kamailio/sqlite/conf/sqlite-extra/domainpolicy-create.sql b/kamailio/sqlite/conf/sqlite-extra/domainpolicy-create.sql @@ -0,0 +1,14 @@ +CREATE TABLE domainpolicy ( + id INTEGER PRIMARY KEY NOT NULL, + rule VARCHAR(255) NOT NULL, + type VARCHAR(255) NOT NULL, + att VARCHAR(255), + val VARCHAR(128), + description VARCHAR(255) NOT NULL, + CONSTRAINT domainpolicy_rav_idx UNIQUE (rule, att, val) +); + +CREATE INDEX domainpolicy_rule_idx ON domainpolicy (rule); + +INSERT INTO version (table_name, table_version) values ('domainpolicy','2'); + diff --git a/kamailio/sqlite/conf/sqlite-extra/drouting-create.sql b/kamailio/sqlite/conf/sqlite-extra/drouting-create.sql @@ -0,0 +1,43 @@ +CREATE TABLE dr_gateways ( + gwid INTEGER PRIMARY KEY NOT NULL, + type INTEGER DEFAULT 0 NOT NULL, + address VARCHAR(128) NOT NULL, + strip INTEGER DEFAULT 0 NOT NULL, + pri_prefix VARCHAR(64) DEFAULT NULL, + attrs VARCHAR(255) DEFAULT NULL, + description VARCHAR(128) DEFAULT '' NOT NULL +); + +INSERT INTO version (table_name, table_version) values ('dr_gateways','3'); + +CREATE TABLE dr_rules ( + ruleid INTEGER PRIMARY KEY NOT NULL, + groupid VARCHAR(255) NOT NULL, + prefix VARCHAR(64) NOT NULL, + timerec VARCHAR(255) NOT NULL, + priority INTEGER DEFAULT 0 NOT NULL, + routeid VARCHAR(64) NOT NULL, + gwlist VARCHAR(255) NOT NULL, + description VARCHAR(128) DEFAULT '' NOT NULL +); + +INSERT INTO version (table_name, table_version) values ('dr_rules','3'); + +CREATE TABLE dr_gw_lists ( + id INTEGER PRIMARY KEY NOT NULL, + gwlist VARCHAR(255) NOT NULL, + description VARCHAR(128) DEFAULT '' NOT NULL +); + +INSERT INTO version (table_name, table_version) values ('dr_gw_lists','1'); + +CREATE TABLE dr_groups ( + id INTEGER PRIMARY KEY NOT NULL, + username VARCHAR(64) NOT NULL, + domain VARCHAR(128) DEFAULT '' NOT NULL, + groupid INTEGER DEFAULT 0 NOT NULL, + description VARCHAR(128) DEFAULT '' NOT NULL +); + +INSERT INTO version (table_name, table_version) values ('dr_groups','2'); + diff --git a/kamailio/sqlite/conf/sqlite-extra/htable-create.sql b/kamailio/sqlite/conf/sqlite-extra/htable-create.sql @@ -0,0 +1,11 @@ +CREATE TABLE htable ( + id INTEGER PRIMARY KEY NOT NULL, + key_name VARCHAR(64) DEFAULT '' NOT NULL, + key_type INTEGER DEFAULT 0 NOT NULL, + value_type INTEGER DEFAULT 0 NOT NULL, + key_value VARCHAR(128) DEFAULT '' NOT NULL, + expires INTEGER DEFAULT 0 NOT NULL +); + +INSERT INTO version (table_name, table_version) values ('htable','2'); + diff --git a/kamailio/sqlite/conf/sqlite-extra/imc-create.sql b/kamailio/sqlite/conf/sqlite-extra/imc-create.sql @@ -0,0 +1,21 @@ +CREATE TABLE imc_rooms ( + id INTEGER PRIMARY KEY NOT NULL, + name VARCHAR(64) NOT NULL, + domain VARCHAR(64) NOT NULL, + flag INTEGER NOT NULL, + CONSTRAINT imc_rooms_name_domain_idx UNIQUE (name, domain) +); + +INSERT INTO version (table_name, table_version) values ('imc_rooms','1'); + +CREATE TABLE imc_members ( + id INTEGER PRIMARY KEY NOT NULL, + username VARCHAR(64) NOT NULL, + domain VARCHAR(64) NOT NULL, + room VARCHAR(64) NOT NULL, + flag INTEGER NOT NULL, + CONSTRAINT imc_members_account_room_idx UNIQUE (username, domain, room) +); + +INSERT INTO version (table_name, table_version) values ('imc_members','1'); + diff --git a/kamailio/sqlite/conf/sqlite-extra/matrix-create.sql b/kamailio/sqlite/conf/sqlite-extra/matrix-create.sql @@ -0,0 +1,10 @@ +CREATE TABLE matrix ( + first INTEGER NOT NULL, + second SMALLINT NOT NULL, + res INTEGER NOT NULL +); + +CREATE INDEX matrix_matrix_idx ON matrix (first, second); + +INSERT INTO version (table_name, table_version) values ('matrix','1'); + diff --git a/kamailio/sqlite/conf/sqlite-extra/mohqueue-create.sql b/kamailio/sqlite/conf/sqlite-extra/mohqueue-create.sql @@ -0,0 +1,26 @@ +CREATE TABLE mohqcalls ( + id INTEGER PRIMARY KEY NOT NULL, + mohq_id INTEGER NOT NULL, + call_id VARCHAR(100) NOT NULL, + call_status INTEGER NOT NULL, + call_from VARCHAR(100) NOT NULL, + call_contact VARCHAR(100), + call_time TIMESTAMP WITHOUT TIME ZONE NOT NULL, + CONSTRAINT mohqcalls_mohqcalls_idx UNIQUE (call_id) +); + +INSERT INTO version (table_name, table_version) values ('mohqcalls','1'); + +CREATE TABLE mohqueues ( + id INTEGER PRIMARY KEY NOT NULL, + name VARCHAR(25) NOT NULL, + uri VARCHAR(100) NOT NULL, + mohdir VARCHAR(100), + mohfile VARCHAR(100) NOT NULL, + debug INTEGER NOT NULL, + CONSTRAINT mohqueues_mohqueue_uri_idx UNIQUE (uri), + CONSTRAINT mohqueues_mohqueue_name_idx UNIQUE (name) +); + +INSERT INTO version (table_name, table_version) values ('mohqueues','1'); + diff --git a/kamailio/sqlite/conf/sqlite-extra/mtree-create.sql b/kamailio/sqlite/conf/sqlite-extra/mtree-create.sql @@ -0,0 +1,19 @@ +CREATE TABLE mtree ( + id INTEGER PRIMARY KEY NOT NULL, + tprefix VARCHAR(32) DEFAULT '' NOT NULL, + tvalue VARCHAR(128) DEFAULT '' NOT NULL, + CONSTRAINT mtree_tprefix_idx UNIQUE (tprefix) +); + +INSERT INTO version (table_name, table_version) values ('mtree','1'); + +CREATE TABLE mtrees ( + id INTEGER PRIMARY KEY NOT NULL, + tname VARCHAR(128) DEFAULT '' NOT NULL, + tprefix VARCHAR(32) DEFAULT '' NOT NULL, + tvalue VARCHAR(128) DEFAULT '' NOT NULL, + CONSTRAINT mtrees_tname_tprefix_tvalue_idx UNIQUE (tname, tprefix, tvalue) +); + +INSERT INTO version (table_name, table_version) values ('mtrees','2'); + diff --git a/kamailio/sqlite/conf/sqlite-extra/pipelimit-create.sql b/kamailio/sqlite/conf/sqlite-extra/pipelimit-create.sql @@ -0,0 +1,9 @@ +CREATE TABLE pl_pipes ( + id INTEGER PRIMARY KEY NOT NULL, + pipeid VARCHAR(64) DEFAULT '' NOT NULL, + algorithm VARCHAR(32) DEFAULT '' NOT NULL, + plimit INTEGER DEFAULT 0 NOT NULL +); + +INSERT INTO version (table_name, table_version) values ('pl_pipes','1'); + diff --git a/kamailio/sqlite/conf/sqlite-extra/purple-create.sql b/kamailio/sqlite/conf/sqlite-extra/purple-create.sql @@ -0,0 +1,10 @@ +CREATE TABLE purplemap ( + id INTEGER PRIMARY KEY NOT NULL, + sip_user VARCHAR(128) NOT NULL, + ext_user VARCHAR(128) NOT NULL, + ext_prot VARCHAR(16) NOT NULL, + ext_pass VARCHAR(64) +); + +INSERT INTO version (table_name, table_version) values ('purplemap','1'); + diff --git a/kamailio/sqlite/conf/sqlite-extra/rls-create.sql b/kamailio/sqlite/conf/sqlite-extra/rls-create.sql @@ -0,0 +1,53 @@ +CREATE TABLE rls_presentity ( + id INTEGER PRIMARY KEY NOT NULL, + rlsubs_did VARCHAR(255) NOT NULL, + resource_uri VARCHAR(128) NOT NULL, + content_type VARCHAR(255) NOT NULL, + presence_state BLOB NOT NULL, + expires INTEGER NOT NULL, + updated INTEGER NOT NULL, + auth_state INTEGER NOT NULL, + reason VARCHAR(64) NOT NULL, + CONSTRAINT rls_presentity_rls_presentity_idx UNIQUE (rlsubs_did, resource_uri) +); + +CREATE INDEX rls_presentity_rlsubs_idx ON rls_presentity (rlsubs_did); +CREATE INDEX rls_presentity_updated_idx ON rls_presentity (updated); +CREATE INDEX rls_presentity_expires_idx ON rls_presentity (expires); + +INSERT INTO version (table_name, table_version) values ('rls_presentity','1'); + +CREATE TABLE rls_watchers ( + id INTEGER PRIMARY KEY NOT NULL, + presentity_uri VARCHAR(128) NOT NULL, + to_user VARCHAR(64) NOT NULL, + to_domain VARCHAR(64) NOT NULL, + watcher_username VARCHAR(64) NOT NULL, + watcher_domain VARCHAR(64) NOT NULL, + event VARCHAR(64) DEFAULT 'presence' NOT NULL, + event_id VARCHAR(64), + to_tag VARCHAR(64) NOT NULL, + from_tag VARCHAR(64) NOT NULL, + callid VARCHAR(255) NOT NULL, + local_cseq INTEGER NOT NULL, + remote_cseq INTEGER NOT NULL, + contact VARCHAR(128) NOT NULL, + record_route TEXT, + expires INTEGER NOT NULL, + status INTEGER DEFAULT 2 NOT NULL, + reason VARCHAR(64) NOT NULL, + version INTEGER DEFAULT 0 NOT NULL, + socket_info VARCHAR(64) NOT NULL, + local_contact VARCHAR(128) NOT NULL, + from_user VARCHAR(64) NOT NULL, + from_domain VARCHAR(64) NOT NULL, + updated INTEGER NOT NULL, + CONSTRAINT rls_watchers_rls_watcher_idx UNIQUE (callid, to_tag, from_tag) +); + +CREATE INDEX rls_watchers_rls_watchers_update ON rls_watchers (watcher_username, watcher_domain, event); +CREATE INDEX rls_watchers_rls_watchers_expires ON rls_watchers (expires); +CREATE INDEX rls_watchers_updated_idx ON rls_watchers (updated); + +INSERT INTO version (table_name, table_version) values ('rls_watchers','3'); + diff --git a/kamailio/sqlite/conf/sqlite-extra/rtpengine-create.sql b/kamailio/sqlite/conf/sqlite-extra/rtpengine-create.sql @@ -0,0 +1,12 @@ +CREATE TABLE rtpengine ( + id INTEGER PRIMARY KEY NOT NULL, + setid INTEGER DEFAULT 0 NOT NULL, + url VARCHAR(64) NOT NULL, + weight INTEGER DEFAULT 1 NOT NULL, + disabled INTEGER DEFAULT 0 NOT NULL, + stamp TIMESTAMP WITHOUT TIME ZONE DEFAULT '1900-01-01 00:00:01' NOT NULL, + CONSTRAINT rtpengine_rtpengine_nodes UNIQUE (setid, url) +); + +INSERT INTO version (table_name, table_version) values ('rtpengine','1'); + diff --git a/kamailio/sqlite/conf/sqlite-extra/rtpproxy-create.sql b/kamailio/sqlite/conf/sqlite-extra/rtpproxy-create.sql @@ -0,0 +1,11 @@ +CREATE TABLE rtpproxy ( + id INTEGER PRIMARY KEY NOT NULL, + setid VARCHAR(32) DEFAULT 00 NOT NULL, + url VARCHAR(64) DEFAULT '' NOT NULL, + flags INTEGER DEFAULT 0 NOT NULL, + weight INTEGER DEFAULT 1 NOT NULL, + description VARCHAR(64) DEFAULT '' NOT NULL +); + +INSERT INTO version (table_name, table_version) values ('rtpproxy','1'); + diff --git a/kamailio/sqlite/conf/sqlite-extra/sca-create.sql b/kamailio/sqlite/conf/sqlite-extra/sca-create.sql @@ -0,0 +1,23 @@ +CREATE TABLE sca_subscriptions ( + id INTEGER PRIMARY KEY NOT NULL, + subscriber VARCHAR(255) NOT NULL, + aor VARCHAR(255) NOT NULL, + event INTEGER DEFAULT 0 NOT NULL, + expires INTEGER DEFAULT 0 NOT NULL, + state INTEGER DEFAULT 0 NOT NULL, + app_idx INTEGER DEFAULT 0 NOT NULL, + call_id VARCHAR(255) NOT NULL, + from_tag VARCHAR(64) NOT NULL, + to_tag VARCHAR(64) NOT NULL, + record_route TEXT, + notify_cseq INTEGER NOT NULL, + subscribe_cseq INTEGER NOT NULL, + server_id INTEGER DEFAULT 0 NOT NULL, + CONSTRAINT sca_subscriptions_sca_subscriptions_idx UNIQUE (subscriber, call_id, from_tag, to_tag) +); + +CREATE INDEX sca_subscriptions_sca_expires_idx ON sca_subscriptions (server_id, expires); +CREATE INDEX sca_subscriptions_sca_subscribers_idx ON sca_subscriptions (subscriber, event); + +INSERT INTO version (table_name, table_version) values ('sca_subscriptions','2'); + diff --git a/kamailio/sqlite/conf/sqlite-extra/siptrace-create.sql b/kamailio/sqlite/conf/sqlite-extra/siptrace-create.sql @@ -0,0 +1,23 @@ +CREATE TABLE sip_trace ( + id INTEGER PRIMARY KEY NOT NULL, + time_stamp TIMESTAMP WITHOUT TIME ZONE DEFAULT '2000-01-01 00:00:01' NOT NULL, + time_us INTEGER DEFAULT 0 NOT NULL, + callid VARCHAR(255) DEFAULT '' NOT NULL, + traced_user VARCHAR(128) DEFAULT '' NOT NULL, + msg TEXT NOT NULL, + method VARCHAR(50) DEFAULT '' NOT NULL, + status VARCHAR(128) DEFAULT '' NOT NULL, + fromip VARCHAR(50) DEFAULT '' NOT NULL, + toip VARCHAR(50) DEFAULT '' NOT NULL, + fromtag VARCHAR(64) DEFAULT '' NOT NULL, + totag VARCHAR(64) DEFAULT '' NOT NULL, + direction VARCHAR(4) DEFAULT '' NOT NULL +); + +CREATE INDEX sip_trace_traced_user_idx ON sip_trace (traced_user); +CREATE INDEX sip_trace_date_idx ON sip_trace (time_stamp); +CREATE INDEX sip_trace_fromip_idx ON sip_trace (fromip); +CREATE INDEX sip_trace_callid_idx ON sip_trace (callid); + +INSERT INTO version (table_name, table_version) values ('sip_trace','4'); + diff --git a/kamailio/sqlite/conf/sqlite-extra/topos-create.sql b/kamailio/sqlite/conf/sqlite-extra/topos-create.sql @@ -0,0 +1,69 @@ +CREATE TABLE topos_d ( + id INTEGER PRIMARY KEY NOT NULL, + rectime TIMESTAMP WITHOUT TIME ZONE NOT NULL, + s_method VARCHAR(64) DEFAULT '' NOT NULL, + s_cseq VARCHAR(64) DEFAULT '' NOT NULL, + a_callid VARCHAR(255) DEFAULT '' NOT NULL, + a_uuid VARCHAR(255) DEFAULT '' NOT NULL, + b_uuid VARCHAR(255) DEFAULT '' NOT NULL, + a_contact VARCHAR(128) DEFAULT '' NOT NULL, + b_contact VARCHAR(128) DEFAULT '' NOT NULL, + as_contact VARCHAR(128) DEFAULT '' NOT NULL, + bs_contact VARCHAR(128) DEFAULT '' NOT NULL, + a_tag VARCHAR(255) DEFAULT '' NOT NULL, + b_tag VARCHAR(255) DEFAULT '' NOT NULL, + a_rr TEXT, + b_rr TEXT, + s_rr TEXT, + iflags INTEGER DEFAULT 0 NOT NULL, + a_uri VARCHAR(128) DEFAULT '' NOT NULL, + b_uri VARCHAR(128) DEFAULT '' NOT NULL, + r_uri VARCHAR(128) DEFAULT '' NOT NULL, + a_srcaddr VARCHAR(128) DEFAULT '' NOT NULL, + b_srcaddr VARCHAR(128) DEFAULT '' NOT NULL, + a_socket VARCHAR(128) DEFAULT '' NOT NULL, + b_socket VARCHAR(128) DEFAULT '' NOT NULL +); + +CREATE INDEX topos_d_rectime_idx ON topos_d (rectime); +CREATE INDEX topos_d_a_callid_idx ON topos_d (a_callid); +CREATE INDEX topos_d_a_uuid_idx ON topos_d (a_uuid); +CREATE INDEX topos_d_b_uuid_idx ON topos_d (b_uuid); + +INSERT INTO version (table_name, table_version) values ('topos_d','1'); + +CREATE TABLE topos_t ( + id INTEGER PRIMARY KEY NOT NULL, + rectime TIMESTAMP WITHOUT TIME ZONE NOT NULL, + s_method VARCHAR(64) DEFAULT '' NOT NULL, + s_cseq VARCHAR(64) DEFAULT '' NOT NULL, + a_callid VARCHAR(255) DEFAULT '' NOT NULL, + a_uuid VARCHAR(255) DEFAULT '' NOT NULL, + b_uuid VARCHAR(255) DEFAULT '' NOT NULL, + direction INTEGER DEFAULT 0 NOT NULL, + x_via TEXT, + x_vbranch VARCHAR(255) DEFAULT '' NOT NULL, + x_rr TEXT, + y_rr TEXT, + s_rr TEXT, + x_uri VARCHAR(128) DEFAULT '' NOT NULL, + a_contact VARCHAR(128) DEFAULT '' NOT NULL, + b_contact VARCHAR(128) DEFAULT '' NOT NULL, + as_contact VARCHAR(128) DEFAULT '' NOT NULL, + bs_contact VARCHAR(128) DEFAULT '' NOT NULL, + x_tag VARCHAR(255) DEFAULT '' NOT NULL, + a_tag VARCHAR(255) DEFAULT '' NOT NULL, + b_tag VARCHAR(255) DEFAULT '' NOT NULL, + a_srcaddr VARCHAR(128) DEFAULT '' NOT NULL, + b_srcaddr VARCHAR(128) DEFAULT '' NOT NULL, + a_socket VARCHAR(128) DEFAULT '' NOT NULL, + b_socket VARCHAR(128) DEFAULT '' NOT NULL +); + +CREATE INDEX topos_t_rectime_idx ON topos_t (rectime); +CREATE INDEX topos_t_a_callid_idx ON topos_t (a_callid); +CREATE INDEX topos_t_x_vbranch_idx ON topos_t (x_vbranch); +CREATE INDEX topos_t_a_uuid_idx ON topos_t (a_uuid); + +INSERT INTO version (table_name, table_version) values ('topos_t','1'); + diff --git a/kamailio/sqlite/conf/sqlite-extra/uac-create.sql b/kamailio/sqlite/conf/sqlite-extra/uac-create.sql @@ -0,0 +1,20 @@ +CREATE TABLE uacreg ( + id INTEGER PRIMARY KEY NOT NULL, + l_uuid VARCHAR(64) DEFAULT '' NOT NULL, + l_username VARCHAR(64) DEFAULT '' NOT NULL, + l_domain VARCHAR(64) DEFAULT '' NOT NULL, + r_username VARCHAR(64) DEFAULT '' NOT NULL, + r_domain VARCHAR(64) DEFAULT '' NOT NULL, + realm VARCHAR(64) DEFAULT '' NOT NULL, + auth_username VARCHAR(64) DEFAULT '' NOT NULL, + auth_password VARCHAR(64) DEFAULT '' NOT NULL, + auth_ha1 VARCHAR(128) DEFAULT '' NOT NULL, + auth_proxy VARCHAR(128) DEFAULT '' NOT NULL, + expires INTEGER DEFAULT 0 NOT NULL, + flags INTEGER DEFAULT 0 NOT NULL, + reg_delay INTEGER DEFAULT 0 NOT NULL, + CONSTRAINT uacreg_l_uuid_idx UNIQUE (l_uuid) +); + +INSERT INTO version (table_name, table_version) values ('uacreg','3'); + diff --git a/kamailio/sqlite/conf/sqlite-extra/uid_auth_db-create.sql b/kamailio/sqlite/conf/sqlite-extra/uid_auth_db-create.sql @@ -0,0 +1,19 @@ +CREATE TABLE uid_credentials ( + id INTEGER PRIMARY KEY NOT NULL, + auth_username VARCHAR(64) NOT NULL, + did VARCHAR(64) DEFAULT '_default' NOT NULL, + realm VARCHAR(64) NOT NULL, + password VARCHAR(28) DEFAULT '' NOT NULL, + flags INTEGER DEFAULT 0 NOT NULL, + ha1 VARCHAR(32) NOT NULL, + ha1b VARCHAR(32) DEFAULT '' NOT NULL, + uid VARCHAR(64) NOT NULL +); + +CREATE INDEX uid_credentials_cred_idx ON uid_credentials (auth_username, did); +CREATE INDEX uid_credentials_uid ON uid_credentials (uid); +CREATE INDEX uid_credentials_did_idx ON uid_credentials (did); +CREATE INDEX uid_credentials_realm_idx ON uid_credentials (realm); + +INSERT INTO version (table_name, table_version) values ('uid_credentials','7'); + diff --git a/kamailio/sqlite/conf/sqlite-extra/uid_avp_db-create.sql b/kamailio/sqlite/conf/sqlite-extra/uid_avp_db-create.sql @@ -0,0 +1,12 @@ +CREATE TABLE uid_user_attrs ( + id INTEGER PRIMARY KEY NOT NULL, + uid VARCHAR(64) NOT NULL, + name VARCHAR(32) NOT NULL, + value VARCHAR(128), + type INTEGER DEFAULT 0 NOT NULL, + flags INTEGER DEFAULT 0 NOT NULL, + CONSTRAINT uid_user_attrs_userattrs_idx UNIQUE (uid, name, value) +); + +INSERT INTO version (table_name, table_version) values ('uid_user_attrs','3'); + diff --git a/kamailio/sqlite/conf/sqlite-extra/uid_domain-create.sql b/kamailio/sqlite/conf/sqlite-extra/uid_domain-create.sql @@ -0,0 +1,26 @@ +CREATE TABLE uid_domain ( + id INTEGER PRIMARY KEY NOT NULL, + did VARCHAR(64) NOT NULL, + domain VARCHAR(64) NOT NULL, + flags INTEGER DEFAULT 0 NOT NULL, + CONSTRAINT uid_domain_domain_idx UNIQUE (domain) +); + +CREATE INDEX uid_domain_did_idx ON uid_domain (did); + +INSERT INTO version (table_name, table_version) values ('uid_domain','2'); + +CREATE TABLE uid_domain_attrs ( + id INTEGER PRIMARY KEY NOT NULL, + did VARCHAR(64), + name VARCHAR(32) NOT NULL, + type INTEGER DEFAULT 0 NOT NULL, + value VARCHAR(128), + flags INTEGER DEFAULT 0 NOT NULL, + CONSTRAINT uid_domain_attrs_domain_attr_idx UNIQUE (did, name, value) +); + +CREATE INDEX uid_domain_attrs_domain_did ON uid_domain_attrs (did, flags); + +INSERT INTO version (table_name, table_version) values ('uid_domain_attrs','1'); + diff --git a/kamailio/sqlite/conf/sqlite-extra/uid_gflags-create.sql b/kamailio/sqlite/conf/sqlite-extra/uid_gflags-create.sql @@ -0,0 +1,11 @@ +CREATE TABLE uid_global_attrs ( + id INTEGER PRIMARY KEY NOT NULL, + name VARCHAR(32) NOT NULL, + type INTEGER DEFAULT 0 NOT NULL, + value VARCHAR(128), + flags INTEGER DEFAULT 0 NOT NULL, + CONSTRAINT uid_global_attrs_global_attrs_idx UNIQUE (name, value) +); + +INSERT INTO version (table_name, table_version) values ('uid_global_attrs','1'); + diff --git a/kamailio/sqlite/conf/sqlite-extra/uid_uri_db-create.sql b/kamailio/sqlite/conf/sqlite-extra/uid_uri_db-create.sql @@ -0,0 +1,28 @@ +CREATE TABLE uid_uri ( + id INTEGER PRIMARY KEY NOT NULL, + uid VARCHAR(64) NOT NULL, + did VARCHAR(64) NOT NULL, + username VARCHAR(64) NOT NULL, + flags INTEGER DEFAULT 0 NOT NULL, + scheme VARCHAR(8) DEFAULT 'sip' NOT NULL +); + +CREATE INDEX uid_uri_uri_idx1 ON uid_uri (username, did, scheme); +CREATE INDEX uid_uri_uri_uid ON uid_uri (uid); + +INSERT INTO version (table_name, table_version) values ('uid_uri','3'); + +CREATE TABLE uid_uri_attrs ( + id INTEGER PRIMARY KEY NOT NULL, + username VARCHAR(64) NOT NULL, + did VARCHAR(64) NOT NULL, + name VARCHAR(32) NOT NULL, + value VARCHAR(128), + type INTEGER DEFAULT 0 NOT NULL, + flags INTEGER DEFAULT 0 NOT NULL, + scheme VARCHAR(8) DEFAULT 'sip' NOT NULL, + CONSTRAINT uid_uri_attrs_uriattrs_idx UNIQUE (username, did, name, value, scheme) +); + +INSERT INTO version (table_name, table_version) values ('uid_uri_attrs','2'); + diff --git a/kamailio/sqlite/conf/sqlite-extra/userblacklist-create.sql b/kamailio/sqlite/conf/sqlite-extra/userblacklist-create.sql @@ -0,0 +1,23 @@ +CREATE TABLE userblacklist ( + id INTEGER PRIMARY KEY NOT NULL, + username VARCHAR(64) DEFAULT '' NOT NULL, + domain VARCHAR(64) DEFAULT '' NOT NULL, + prefix VARCHAR(64) DEFAULT '' NOT NULL, + whitelist SMALLINT DEFAULT 0 NOT NULL +); + +CREATE INDEX userblacklist_userblacklist_idx ON userblacklist (username, domain, prefix); + +INSERT INTO version (table_name, table_version) values ('userblacklist','1'); + +CREATE TABLE globalblacklist ( + id INTEGER PRIMARY KEY NOT NULL, + prefix VARCHAR(64) DEFAULT '' NOT NULL, + whitelist SMALLINT DEFAULT 0 NOT NULL, + description VARCHAR(255) DEFAULT NULL +); + +CREATE INDEX globalblacklist_globalblacklist_idx ON globalblacklist (prefix); + +INSERT INTO version (table_name, table_version) values ('globalblacklist','1'); + diff --git a/kamailio/sqlite/conf/sqlite/acc-create.sql b/kamailio/sqlite/conf/sqlite/acc-create.sql @@ -0,0 +1,41 @@ +CREATE TABLE acc ( + id INTEGER PRIMARY KEY NOT NULL, + method VARCHAR(16) DEFAULT '' NOT NULL, + from_tag VARCHAR(64) DEFAULT '' NOT NULL, + to_tag VARCHAR(64) DEFAULT '' NOT NULL, + callid VARCHAR(255) DEFAULT '' NOT NULL, + sip_code VARCHAR(3) DEFAULT '' NOT NULL, + sip_reason VARCHAR(128) DEFAULT '' NOT NULL, + time TIMESTAMP WITHOUT TIME ZONE NOT NULL +); + +CREATE INDEX acc_callid_idx ON acc (callid); + +INSERT INTO version (table_name, table_version) values ('acc','5'); + +CREATE TABLE acc_cdrs ( + id INTEGER PRIMARY KEY NOT NULL, + start_time TIMESTAMP WITHOUT TIME ZONE DEFAULT '2000-01-01 00:00:00' NOT NULL, + end_time TIMESTAMP WITHOUT TIME ZONE DEFAULT '2000-01-01 00:00:00' NOT NULL, + duration REAL DEFAULT 0 NOT NULL +); + +CREATE INDEX acc_cdrs_start_time_idx ON acc_cdrs (start_time); + +INSERT INTO version (table_name, table_version) values ('acc_cdrs','2'); + +CREATE TABLE missed_calls ( + id INTEGER PRIMARY KEY NOT NULL, + method VARCHAR(16) DEFAULT '' NOT NULL, + from_tag VARCHAR(64) DEFAULT '' NOT NULL, + to_tag VARCHAR(64) DEFAULT '' NOT NULL, + callid VARCHAR(255) DEFAULT '' NOT NULL, + sip_code VARCHAR(3) DEFAULT '' NOT NULL, + sip_reason VARCHAR(128) DEFAULT '' NOT NULL, + time TIMESTAMP WITHOUT TIME ZONE NOT NULL +); + +CREATE INDEX missed_calls_callid_idx ON missed_calls (callid); + +INSERT INTO version (table_name, table_version) values ('missed_calls','4'); + diff --git a/kamailio/sqlite/conf/sqlite/alias_db-create.sql b/kamailio/sqlite/conf/sqlite/alias_db-create.sql @@ -0,0 +1,14 @@ +CREATE TABLE dbaliases ( + id INTEGER PRIMARY KEY NOT NULL, + alias_username VARCHAR(64) DEFAULT '' NOT NULL, + alias_domain VARCHAR(64) DEFAULT '' NOT NULL, + username VARCHAR(64) DEFAULT '' NOT NULL, + domain VARCHAR(64) DEFAULT '' NOT NULL +); + +CREATE INDEX dbaliases_alias_user_idx ON dbaliases (alias_username); +CREATE INDEX dbaliases_alias_idx ON dbaliases (alias_username, alias_domain); +CREATE INDEX dbaliases_target_idx ON dbaliases (username, domain); + +INSERT INTO version (table_name, table_version) values ('dbaliases','1'); + diff --git a/kamailio/sqlite/conf/sqlite/auth_db-create.sql b/kamailio/sqlite/conf/sqlite/auth_db-create.sql @@ -0,0 +1,14 @@ +CREATE TABLE subscriber ( + id INTEGER PRIMARY KEY NOT NULL, + username VARCHAR(64) DEFAULT '' NOT NULL, + domain VARCHAR(64) DEFAULT '' NOT NULL, + password VARCHAR(64) DEFAULT '' NOT NULL, + ha1 VARCHAR(128) DEFAULT '' NOT NULL, + ha1b VARCHAR(128) DEFAULT '' NOT NULL, + CONSTRAINT subscriber_account_idx UNIQUE (username, domain) +); + +CREATE INDEX subscriber_username_idx ON subscriber (username); + +INSERT INTO version (table_name, table_version) values ('subscriber','7'); + diff --git a/kamailio/sqlite/conf/sqlite/avpops-create.sql b/kamailio/sqlite/conf/sqlite/avpops-create.sql @@ -0,0 +1,16 @@ +CREATE TABLE usr_preferences ( + id INTEGER PRIMARY KEY NOT NULL, + uuid VARCHAR(64) DEFAULT '' NOT NULL, + username VARCHAR(128) DEFAULT 0 NOT NULL, + domain VARCHAR(64) DEFAULT '' NOT NULL, + attribute VARCHAR(32) DEFAULT '' NOT NULL, + type INTEGER DEFAULT 0 NOT NULL, + value VARCHAR(128) DEFAULT '' NOT NULL, + last_modified TIMESTAMP WITHOUT TIME ZONE DEFAULT '2000-01-01 00:00:01' NOT NULL +); + +CREATE INDEX usr_preferences_ua_idx ON usr_preferences (uuid, attribute); +CREATE INDEX usr_preferences_uda_idx ON usr_preferences (username, domain, attribute); + +INSERT INTO version (table_name, table_version) values ('usr_preferences','2'); + diff --git a/kamailio/sqlite/conf/sqlite/dialog-create.sql b/kamailio/sqlite/conf/sqlite/dialog-create.sql @@ -0,0 +1,43 @@ +CREATE TABLE dialog ( + id INTEGER PRIMARY KEY NOT NULL, + hash_entry INTEGER NOT NULL, + hash_id INTEGER NOT NULL, + callid VARCHAR(255) NOT NULL, + from_uri VARCHAR(128) NOT NULL, + from_tag VARCHAR(64) NOT NULL, + to_uri VARCHAR(128) NOT NULL, + to_tag VARCHAR(64) NOT NULL, + caller_cseq VARCHAR(20) NOT NULL, + callee_cseq VARCHAR(20) NOT NULL, + caller_route_set VARCHAR(512), + callee_route_set VARCHAR(512), + caller_contact VARCHAR(128) NOT NULL, + callee_contact VARCHAR(128) NOT NULL, + caller_sock VARCHAR(64) NOT NULL, + callee_sock VARCHAR(64) NOT NULL, + state INTEGER NOT NULL, + start_time INTEGER NOT NULL, + timeout INTEGER DEFAULT 0 NOT NULL, + sflags INTEGER DEFAULT 0 NOT NULL, + iflags INTEGER DEFAULT 0 NOT NULL, + toroute_name VARCHAR(32), + req_uri VARCHAR(128) NOT NULL, + xdata VARCHAR(512) +); + +CREATE INDEX dialog_hash_idx ON dialog (hash_entry, hash_id); + +INSERT INTO version (table_name, table_version) values ('dialog','7'); + +CREATE TABLE dialog_vars ( + id INTEGER PRIMARY KEY NOT NULL, + hash_entry INTEGER NOT NULL, + hash_id INTEGER NOT NULL, + dialog_key VARCHAR(128) NOT NULL, + dialog_value VARCHAR(512) NOT NULL +); + +CREATE INDEX dialog_vars_hash_idx ON dialog_vars (hash_entry, hash_id); + +INSERT INTO version (table_name, table_version) values ('dialog_vars','1'); + diff --git a/kamailio/sqlite/conf/sqlite/dialplan-create.sql b/kamailio/sqlite/conf/sqlite/dialplan-create.sql @@ -0,0 +1,14 @@ +CREATE TABLE dialplan ( + id INTEGER PRIMARY KEY NOT NULL, + dpid INTEGER NOT NULL, + pr INTEGER NOT NULL, + match_op INTEGER NOT NULL, + match_exp VARCHAR(64) NOT NULL, + match_len INTEGER NOT NULL, + subst_exp VARCHAR(64) NOT NULL, + repl_exp VARCHAR(256) NOT NULL, + attrs VARCHAR(64) NOT NULL +); + +INSERT INTO version (table_name, table_version) values ('dialplan','2'); + diff --git a/kamailio/sqlite/conf/sqlite/dispatcher-create.sql b/kamailio/sqlite/conf/sqlite/dispatcher-create.sql @@ -0,0 +1,12 @@ +CREATE TABLE dispatcher ( + id INTEGER PRIMARY KEY NOT NULL, + setid INTEGER DEFAULT 0 NOT NULL, + destination VARCHAR(192) DEFAULT '' NOT NULL, + flags INTEGER DEFAULT 0 NOT NULL, + priority INTEGER DEFAULT 0 NOT NULL, + attrs VARCHAR(128) DEFAULT '' NOT NULL, + description VARCHAR(64) DEFAULT '' NOT NULL +); + +INSERT INTO version (table_name, table_version) values ('dispatcher','4'); + diff --git a/kamailio/sqlite/conf/sqlite/domain-create.sql b/kamailio/sqlite/conf/sqlite/domain-create.sql @@ -0,0 +1,23 @@ +CREATE TABLE domain ( + id INTEGER PRIMARY KEY NOT NULL, + domain VARCHAR(64) NOT NULL, + did VARCHAR(64) DEFAULT NULL, + last_modified TIMESTAMP WITHOUT TIME ZONE DEFAULT '2000-01-01 00:00:01' NOT NULL, + CONSTRAINT domain_domain_idx UNIQUE (domain) +); + +INSERT INTO version (table_name, table_version) values ('domain','2'); + +CREATE TABLE domain_attrs ( + id INTEGER PRIMARY KEY NOT NULL, + did VARCHAR(64) NOT NULL, + name VARCHAR(32) NOT NULL, + type INTEGER NOT NULL, + value VARCHAR(255) NOT NULL, + last_modified TIMESTAMP WITHOUT TIME ZONE DEFAULT '2000-01-01 00:00:01' NOT NULL +); + +CREATE INDEX domain_attrs_domain_attrs_idx ON domain_attrs (did, name); + +INSERT INTO version (table_name, table_version) values ('domain_attrs','1'); + diff --git a/kamailio/sqlite/conf/sqlite/group-create.sql b/kamailio/sqlite/conf/sqlite/group-create.sql @@ -0,0 +1,21 @@ +CREATE TABLE grp ( + id INTEGER PRIMARY KEY NOT NULL, + username VARCHAR(64) DEFAULT '' NOT NULL, + domain VARCHAR(64) DEFAULT '' NOT NULL, + grp VARCHAR(64) DEFAULT '' NOT NULL, + last_modified TIMESTAMP WITHOUT TIME ZONE DEFAULT '2000-01-01 00:00:01' NOT NULL, + CONSTRAINT grp_account_group_idx UNIQUE (username, domain, grp) +); + +INSERT INTO version (table_name, table_version) values ('grp','2'); + +CREATE TABLE re_grp ( + id INTEGER PRIMARY KEY NOT NULL, + reg_exp VARCHAR(128) DEFAULT '' NOT NULL, + group_id INTEGER DEFAULT 0 NOT NULL +); + +CREATE INDEX re_grp_group_idx ON re_grp (group_id); + +INSERT INTO version (table_name, table_version) values ('re_grp','1'); + diff --git a/kamailio/sqlite/conf/sqlite/lcr-create.sql b/kamailio/sqlite/conf/sqlite/lcr-create.sql @@ -0,0 +1,49 @@ +CREATE TABLE lcr_gw ( + id INTEGER PRIMARY KEY NOT NULL, + lcr_id SMALLINT NOT NULL, + gw_name VARCHAR(128), + ip_addr VARCHAR(50), + hostname VARCHAR(64), + port SMALLINT, + params VARCHAR(64), + uri_scheme SMALLINT, + transport SMALLINT, + strip SMALLINT, + prefix VARCHAR(16) DEFAULT NULL, + tag VARCHAR(64) DEFAULT NULL, + flags INTEGER DEFAULT 0 NOT NULL, + defunct INTEGER DEFAULT NULL +); + +CREATE INDEX lcr_gw_lcr_id_idx ON lcr_gw (lcr_id); + +INSERT INTO version (table_name, table_version) values ('lcr_gw','3'); + +CREATE TABLE lcr_rule_target ( + id INTEGER PRIMARY KEY NOT NULL, + lcr_id SMALLINT NOT NULL, + rule_id INTEGER NOT NULL, + gw_id INTEGER NOT NULL, + priority SMALLINT NOT NULL, + weight INTEGER DEFAULT 1 NOT NULL, + CONSTRAINT lcr_rule_target_rule_id_gw_id_idx UNIQUE (rule_id, gw_id) +); + +CREATE INDEX lcr_rule_target_lcr_id_idx ON lcr_rule_target (lcr_id); + +INSERT INTO version (table_name, table_version) values ('lcr_rule_target','1'); + +CREATE TABLE lcr_rule ( + id INTEGER PRIMARY KEY NOT NULL, + lcr_id SMALLINT NOT NULL, + prefix VARCHAR(16) DEFAULT NULL, + from_uri VARCHAR(64) DEFAULT NULL, + request_uri VARCHAR(64) DEFAULT NULL, + mt_tvalue VARCHAR(128) DEFAULT NULL, + stopper INTEGER DEFAULT 0 NOT NULL, + enabled INTEGER DEFAULT 1 NOT NULL, + CONSTRAINT lcr_rule_lcr_id_prefix_from_uri_idx UNIQUE (lcr_id, prefix, from_uri) +); + +INSERT INTO version (table_name, table_version) values ('lcr_rule','3'); + diff --git a/kamailio/sqlite/conf/sqlite/msilo-create.sql b/kamailio/sqlite/conf/sqlite/msilo-create.sql @@ -0,0 +1,20 @@ +CREATE TABLE silo ( + id INTEGER PRIMARY KEY NOT NULL, + src_addr VARCHAR(128) DEFAULT '' NOT NULL, + dst_addr VARCHAR(128) DEFAULT '' NOT NULL, + username VARCHAR(64) DEFAULT '' NOT NULL, + domain VARCHAR(64) DEFAULT '' NOT NULL, + inc_time INTEGER DEFAULT 0 NOT NULL, + exp_time INTEGER DEFAULT 0 NOT NULL, + snd_time INTEGER DEFAULT 0 NOT NULL, + ctype VARCHAR(32) DEFAULT 'text/plain' NOT NULL, + body BLOB, + extra_hdrs TEXT, + callid VARCHAR(128) DEFAULT '' NOT NULL, + status INTEGER DEFAULT 0 NOT NULL +); + +CREATE INDEX silo_account_idx ON silo (username, domain); + +INSERT INTO version (table_name, table_version) values ('silo','8'); + diff --git a/kamailio/sqlite/conf/sqlite/pdt-create.sql b/kamailio/sqlite/conf/sqlite/pdt-create.sql @@ -0,0 +1,10 @@ +CREATE TABLE pdt ( + id INTEGER PRIMARY KEY NOT NULL, + sdomain VARCHAR(128) NOT NULL, + prefix VARCHAR(32) NOT NULL, + domain VARCHAR(128) DEFAULT '' NOT NULL, + CONSTRAINT pdt_sdomain_prefix_idx UNIQUE (sdomain, prefix) +); + +INSERT INTO version (table_name, table_version) values ('pdt','1'); + diff --git a/kamailio/sqlite/conf/sqlite/permissions-create.sql b/kamailio/sqlite/conf/sqlite/permissions-create.sql @@ -0,0 +1,25 @@ +CREATE TABLE trusted ( + id INTEGER PRIMARY KEY NOT NULL, + src_ip VARCHAR(50) NOT NULL, + proto VARCHAR(4) NOT NULL, + from_pattern VARCHAR(64) DEFAULT NULL, + ruri_pattern VARCHAR(64) DEFAULT NULL, + tag VARCHAR(64), + priority INTEGER DEFAULT 0 NOT NULL +); + +CREATE INDEX trusted_peer_idx ON trusted (src_ip); + +INSERT INTO version (table_name, table_version) values ('trusted','6'); + +CREATE TABLE address ( + id INTEGER PRIMARY KEY NOT NULL, + grp INTEGER DEFAULT 1 NOT NULL, + ip_addr VARCHAR(50) NOT NULL, + mask INTEGER DEFAULT 32 NOT NULL, + port SMALLINT DEFAULT 0 NOT NULL, + tag VARCHAR(64) +); + +INSERT INTO version (table_name, table_version) values ('address','6'); + diff --git a/kamailio/sqlite/conf/sqlite/registrar-create.sql b/kamailio/sqlite/conf/sqlite/registrar-create.sql @@ -0,0 +1,32 @@ +CREATE TABLE aliases ( + id INTEGER PRIMARY KEY NOT NULL, + ruid VARCHAR(64) DEFAULT '' NOT NULL, + username VARCHAR(64) DEFAULT '' NOT NULL, + domain VARCHAR(64) DEFAULT NULL, + contact VARCHAR(255) DEFAULT '' NOT NULL, + received VARCHAR(128) DEFAULT NULL, + path VARCHAR(512) DEFAULT NULL, + expires TIMESTAMP WITHOUT TIME ZONE DEFAULT '2030-05-28 21:32:15' NOT NULL, + q REAL DEFAULT 1.0 NOT NULL, + callid VARCHAR(255) DEFAULT 'Default-Call-ID' NOT NULL, + cseq INTEGER DEFAULT 1 NOT NULL, + last_modified TIMESTAMP WITHOUT TIME ZONE DEFAULT '2000-01-01 00:00:01' NOT NULL, + flags INTEGER DEFAULT 0 NOT NULL, + cflags INTEGER DEFAULT 0 NOT NULL, + user_agent VARCHAR(255) DEFAULT '' NOT NULL, + socket VARCHAR(64) DEFAULT NULL, + methods INTEGER DEFAULT NULL, + instance VARCHAR(255) DEFAULT NULL, + reg_id INTEGER DEFAULT 0 NOT NULL, + server_id INTEGER DEFAULT 0 NOT NULL, + connection_id INTEGER DEFAULT 0 NOT NULL, + keepalive INTEGER DEFAULT 0 NOT NULL, + partition INTEGER DEFAULT 0 NOT NULL, + CONSTRAINT aliases_ruid_idx UNIQUE (ruid) +); + +CREATE INDEX aliases_account_contact_idx ON aliases (username, domain, contact); +CREATE INDEX aliases_expires_idx ON aliases (expires); + +INSERT INTO version (table_name, table_version) values ('aliases','8'); + diff --git a/kamailio/sqlite/conf/sqlite/speeddial-create.sql b/kamailio/sqlite/conf/sqlite/speeddial-create.sql @@ -0,0 +1,15 @@ +CREATE TABLE speed_dial ( + id INTEGER PRIMARY KEY NOT NULL, + username VARCHAR(64) DEFAULT '' NOT NULL, + domain VARCHAR(64) DEFAULT '' NOT NULL, + sd_username VARCHAR(64) DEFAULT '' NOT NULL, + sd_domain VARCHAR(64) DEFAULT '' NOT NULL, + new_uri VARCHAR(128) DEFAULT '' NOT NULL, + fname VARCHAR(64) DEFAULT '' NOT NULL, + lname VARCHAR(64) DEFAULT '' NOT NULL, + description VARCHAR(64) DEFAULT '' NOT NULL, + CONSTRAINT speed_dial_speed_dial_idx UNIQUE (username, domain, sd_domain, sd_username) +); + +INSERT INTO version (table_name, table_version) values ('speed_dial','2'); + diff --git a/kamailio/sqlite/conf/sqlite/standard-create.sql b/kamailio/sqlite/conf/sqlite/standard-create.sql @@ -0,0 +1,8 @@ +CREATE TABLE version ( + table_name VARCHAR(32) NOT NULL, + table_version INTEGER DEFAULT 0 NOT NULL, + CONSTRAINT version_table_name_idx UNIQUE (table_name) +); + +INSERT INTO version (table_name, table_version) values ('version','1'); + diff --git a/kamailio/sqlite/conf/sqlite/uri_db-create.sql b/kamailio/sqlite/conf/sqlite/uri_db-create.sql @@ -0,0 +1,11 @@ +CREATE TABLE uri ( + id INTEGER PRIMARY KEY NOT NULL, + username VARCHAR(64) DEFAULT '' NOT NULL, + domain VARCHAR(64) DEFAULT '' NOT NULL, + uri_user VARCHAR(64) DEFAULT '' NOT NULL, + last_modified TIMESTAMP WITHOUT TIME ZONE DEFAULT '2000-01-01 00:00:01' NOT NULL, + CONSTRAINT uri_account_idx UNIQUE (username, domain, uri_user) +); + +INSERT INTO version (table_name, table_version) values ('uri','1'); + diff --git a/kamailio/sqlite/conf/sqlite/usrloc-create.sql b/kamailio/sqlite/conf/sqlite/usrloc-create.sql @@ -0,0 +1,49 @@ +CREATE TABLE location ( + id INTEGER PRIMARY KEY NOT NULL, + ruid VARCHAR(64) DEFAULT '' NOT NULL, + username VARCHAR(64) DEFAULT '' NOT NULL, + domain VARCHAR(64) DEFAULT NULL, + contact VARCHAR(512) DEFAULT '' NOT NULL, + received VARCHAR(128) DEFAULT NULL, + path VARCHAR(512) DEFAULT NULL, + expires TIMESTAMP WITHOUT TIME ZONE DEFAULT '2030-05-28 21:32:15' NOT NULL, + q REAL DEFAULT 1.0 NOT NULL, + callid VARCHAR(255) DEFAULT 'Default-Call-ID' NOT NULL, + cseq INTEGER DEFAULT 1 NOT NULL, + last_modified TIMESTAMP WITHOUT TIME ZONE DEFAULT '2000-01-01 00:00:01' NOT NULL, + flags INTEGER DEFAULT 0 NOT NULL, + cflags INTEGER DEFAULT 0 NOT NULL, + user_agent VARCHAR(255) DEFAULT '' NOT NULL, + socket VARCHAR(64) DEFAULT NULL, + methods INTEGER DEFAULT NULL, + instance VARCHAR(255) DEFAULT NULL, + reg_id INTEGER DEFAULT 0 NOT NULL, + server_id INTEGER DEFAULT 0 NOT NULL, + connection_id INTEGER DEFAULT 0 NOT NULL, + keepalive INTEGER DEFAULT 0 NOT NULL, + partition INTEGER DEFAULT 0 NOT NULL, + CONSTRAINT location_ruid_idx UNIQUE (ruid) +); + +CREATE INDEX location_account_contact_idx ON location (username, domain, contact); +CREATE INDEX location_expires_idx ON location (expires); +CREATE INDEX location_connection_idx ON location (server_id, connection_id); + +INSERT INTO version (table_name, table_version) values ('location','9'); + +CREATE TABLE location_attrs ( + id INTEGER PRIMARY KEY NOT NULL, + ruid VARCHAR(64) DEFAULT '' NOT NULL, + username VARCHAR(64) DEFAULT '' NOT NULL, + domain VARCHAR(64) DEFAULT NULL, + aname VARCHAR(64) DEFAULT '' NOT NULL, + atype INTEGER DEFAULT 0 NOT NULL, + avalue VARCHAR(512) DEFAULT '' NOT NULL, + last_modified TIMESTAMP WITHOUT TIME ZONE DEFAULT '2000-01-01 00:00:01' NOT NULL +); + +CREATE INDEX location_attrs_account_record_idx ON location_attrs (username, domain, ruid); +CREATE INDEX location_attrs_last_modified_idx ON location_attrs (last_modified); + +INSERT INTO version (table_name, table_version) values ('location_attrs','1'); + diff --git a/kamailio/sqlite/setup b/kamailio/sqlite/setup @@ -0,0 +1,6 @@ +#!/usr/bin/env execlineb + +if -tn { test -f /var/kamailio/sqlite.db } + +elglob -0 x db/sqlite/* +sqlite3 -init ${module} /var/kamailio/sqlite.db diff --git a/kamailio/tls/conf/modparam/tls/config b/kamailio/tls/conf/modparam/tls/config @@ -0,0 +1 @@ +"/var/pack/pkg/kamailio/5.2.0/etc/kamailio/tls.cfg" diff --git a/monit/default/data/alert/irc b/monit/default/data/alert/irc @@ -0,0 +1,17 @@ +#!/usr/bin/env execlineb +elgetpositionals #@ message + +importas -i host IRC_HOST +importas -i chan IRC_CHAN +importas -i root IRC_ROOT + +forstdin -n x { + +} + +if -n { + if -t { redirfd -wn 1 ${root}/${host}/in echo "/j ${chan}" } + if -t { redirfd -wn 1 ${root}/${host}/${chan}/in echo "[alert]" "" } +} + +if { echo "could not send irc notification" } exit 1 diff --git a/monit/default/data/check/http b/monit/default/data/check/http @@ -0,0 +1,21 @@ +#!/usr/bin/env execlineb +elgetpositionals #0 scheme - #1 user - #2 host - #3 port - #4 path + +backtick -n x { + fdmove -c 2 1 + + s6-tcpclient -t 20 ${2} ${3} + fdmove -c 0 6 + fdswap 1 7 + if { printf "%s\r\n" + "GET /${4} HTTP/1.1" + "Host: ${2}" + "User-Agent: monit" + "" } + fdswap 7 1 + sed "s/\r//g; q" +} +importas answer x + +if -n { heredoc 0 ${answer} grep -E "^HTTP/[0-9.]+ 200 OK$" } +alert/irc "http://${2}:${3}/${4} -> \"${answer}\"" diff --git a/monit/default/data/check/smtp b/monit/default/data/check/smtp @@ -0,0 +1,14 @@ +#!/usr/bin/env execlineb +elgetpositionals #0 scheme - #1 user - #2 host - #3 port - #4 path + +backtick -n x { + fdmove -c 2 1 + + s6-tcpclient -t 20 ${2} ${3} + fdmove -c 0 6 + sed "s/\r//g; q" +} +importas hello x + +if -n { heredoc 0 ${hello} grep "^220 " } +alert/irc "smtp://${2}:${3} -> \"${hello}\"" diff --git a/monit/default/data/uri/test b/monit/default/data/uri/test @@ -0,0 +1,4 @@ +smtp://josuah.net:25 +http://josuah.net:80 +http://atelier-fu.fr:80 +http://himalaya-solaire.org:80 diff --git a/monit/default/env/IRC_CHAN b/monit/default/env/IRC_CHAN @@ -0,0 +1 @@ +#monit diff --git a/monit/default/env/IRC_HOST b/monit/default/env/IRC_HOST @@ -0,0 +1 @@ +irc.h-o.st diff --git a/monit/default/env/IRC_ROOT b/monit/default/env/IRC_ROOT @@ -0,0 +1 @@ +/var/irc diff --git a/monit/default/producer-for b/monit/default/producer-for @@ -0,0 +1 @@ +alert diff --git a/monit/default/run b/monit/default/run @@ -0,0 +1,18 @@ +#!/usr/bin/env execlineb +fdmove -c 2 1 + +s6-envdir env +cd data + +ifte { if { wait -t 300 { } } snooze -H * -M * -S 20 } { exit 1 } + +forbacktickx -n -d "\n" x { + elglob -0 x uri/* + sed -r "s,([^@:/#]+)://(([^@:/#]*)@)?([^:/#]*)?(:([^/#]*))?(/([^#]*))?(#(.*))?,check/\\1\t\\3\t\\4\t\\6\t\\8\t," ${x} +} +importas -s -d "\t" parts x + +# the uri in data/uri/<uri> are now split into 5 arguments: +#0 scheme - #1 user - #2 host - #3 port - #4 path + +background { ${parts} } diff --git a/monit/default/timeout-finish b/monit/default/timeout-finish @@ -0,0 +1 @@ +300000 diff --git a/monit/default/type b/monit/default/type @@ -0,0 +1 @@ +longrun diff --git a/mpop/default/data/mpoprc b/mpop/default/data/mpoprc @@ -0,0 +1,15 @@ +defaults +tls on +tls_certcheck off +tls_starttls off +uidls_file ~/mail/%U + +account mail@josuah.net +host mail.gandi.net +user mail@josuah.net +auth user +passwordeval "enchive -a$((3600*12)) extract /mnt/key/vault/mpop /dev/stdout" +delivery maildir ~/mail/INBOX +keep on + +account default : mail@josuah.net diff --git a/mpop/default/run b/mpop/default/run @@ -0,0 +1,15 @@ +#!/usr/bin/env execlineb +fdmove -c 2 1 +s6-envdir env + +multisubstitute { + importas USER USER +} + +redirfd -r 0 ./data/mpoprc # it might not be readable as ${USER} +s6-setuidgid $USER + +backtick -n HOME { homeof $USER } importas HOME HOME +cd $HOME + +snooze -M /5 -H * mpop -C /dev/stdin diff --git a/mpop/default/type b/mpop/default/type @@ -0,0 +1 @@ +longrun diff --git a/ngircd/default/conf/Global/Info b/ngircd/default/conf/Global/Info @@ -0,0 +1 @@ +XXX diff --git a/ngircd/default/conf/Global/MotdFile b/ngircd/default/conf/Global/MotdFile @@ -0,0 +1 @@ +data/motd diff --git a/ngircd/default/conf/Global/Ports b/ngircd/default/conf/Global/Ports @@ -0,0 +1 @@ +6667 diff --git a/ngircd/default/conf/Limits/MaxConnections b/ngircd/default/conf/Limits/MaxConnections @@ -0,0 +1 @@ +128 diff --git a/ngircd/default/conf/Limits/MaxConnectionsIP b/ngircd/default/conf/Limits/MaxConnectionsIP @@ -0,0 +1 @@ +20 diff --git a/ngircd/default/conf/Limits/MaxJoins b/ngircd/default/conf/Limits/MaxJoins @@ -0,0 +1 @@ +50 diff --git a/ngircd/default/conf/Limits/MaxNickLength b/ngircd/default/conf/Limits/MaxNickLength @@ -0,0 +1 @@ +10 diff --git a/ngircd/default/conf/Limits/PingTimeout b/ngircd/default/conf/Limits/PingTimeout @@ -0,0 +1 @@ +120 diff --git a/ngircd/default/conf/Limits/PongTimeout b/ngircd/default/conf/Limits/PongTimeout @@ -0,0 +1 @@ +120 diff --git a/ngircd/default/conf/Options/AllowRemoteOper b/ngircd/default/conf/Options/AllowRemoteOper @@ -0,0 +1 @@ +yes diff --git a/ngircd/default/conf/Options/AllowedChannelTypes b/ngircd/default/conf/Options/AllowedChannelTypes @@ -0,0 +1 @@ +#&+ diff --git a/ngircd/default/conf/Options/CloakHost b/ngircd/default/conf/Options/CloakHost @@ -0,0 +1 @@ +%x diff --git a/ngircd/default/conf/Options/DNS b/ngircd/default/conf/Options/DNS @@ -0,0 +1 @@ +no diff --git a/ngircd/default/conf/Options/DefaultUserModes b/ngircd/default/conf/Options/DefaultUserModes @@ -0,0 +1 @@ +iC diff --git a/ngircd/default/conf/Options/Ident b/ngircd/default/conf/Options/Ident @@ -0,0 +1 @@ +no diff --git a/ngircd/default/conf/Options/MorePrivacy b/ngircd/default/conf/Options/MorePrivacy @@ -0,0 +1 @@ +yes diff --git a/ngircd/default/conf/Options/OperCanUseMode b/ngircd/default/conf/Options/OperCanUseMode @@ -0,0 +1 @@ +yes diff --git a/ngircd/default/conf/Options/OperChanPAutoOp b/ngircd/default/conf/Options/OperChanPAutoOp @@ -0,0 +1 @@ +yes diff --git a/ngircd/default/env/USER b/ngircd/default/env/USER @@ -0,0 +1 @@ +nobody diff --git a/ngircd/default/run b/ngircd/default/run @@ -0,0 +1,4 @@ +#!/usr/bin/env execlineb +fdmove -c 2 1 + +ngircd -n -f data/conf diff --git a/ngircd/default/setup b/ngircd/default/setup @@ -0,0 +1,19 @@ +#!/usr/bin/env execlineb + +if { + redirfd -r 0 conf/Operator/Name withstdinas -n x importas nick x + redirfd -r 0 conf/Server/Host withstdinas -n x importas host x + + redirfd -w 1 conf/Operator/Password + pass irc/${host}/${nick} +} + +if { mkdir -p data } +redirfd -w 1 data/conf cd conf + +forbacktickx x { ls } importas dir x +if { printf "\n[%s]\n" $dir } + +forbacktickx x { ls $dir } importas file x +redirfd -r 0 ${dir}/${file} withstdinas -n x importas content x +printf "\t%-20s = %s\n" $file $content diff --git a/ngircd/default/type b/ngircd/default/type @@ -0,0 +1 @@ +longrun diff --git a/ngircd/irc.h-o.st/conf/Global/AdminEMail b/ngircd/irc.h-o.st/conf/Global/AdminEMail @@ -0,0 +1 @@ +mail@josuah.net diff --git a/ngircd/irc.h-o.st/conf/Global/AdminInfo1 b/ngircd/irc.h-o.st/conf/Global/AdminInfo1 @@ -0,0 +1 @@ +XXX diff --git a/ngircd/irc.h-o.st/conf/Global/AdminInfo2 b/ngircd/irc.h-o.st/conf/Global/AdminInfo2 @@ -0,0 +1 @@ +XXX diff --git a/ngircd/irc.h-o.st/conf/Global/Name b/ngircd/irc.h-o.st/conf/Global/Name @@ -0,0 +1 @@ +irc.h-o.st diff --git a/ngircd/irc.h-o.st/conf/Operator/Mask b/ngircd/irc.h-o.st/conf/Operator/Mask @@ -0,0 +1 @@ +iiost!* diff --git a/ngircd/irc.h-o.st/conf/Operator/Name b/ngircd/irc.h-o.st/conf/Operator/Name @@ -0,0 +1 @@ +iiost diff --git a/ngircd/irc.h-o.st/conf/Operator/Password b/ngircd/irc.h-o.st/conf/Operator/Password diff --git a/ngircd/irc.h-o.st/conf/Options/CloakHostSalt b/ngircd/irc.h-o.st/conf/Options/CloakHostSalt @@ -0,0 +1 @@ +XXX diff --git a/ngircd/irc.h-o.st/conf/SSL/CertFile b/ngircd/irc.h-o.st/conf/SSL/CertFile @@ -0,0 +1 @@ +/etc/ssl/irc.h-o.st/fullchain.pem diff --git a/ngircd/irc.h-o.st/conf/SSL/KeyFile b/ngircd/irc.h-o.st/conf/SSL/KeyFile @@ -0,0 +1 @@ +/etc/ssl/irc.h-o.st/privkey.pem diff --git a/ngircd/irc.h-o.st/conf/Server/Host b/ngircd/irc.h-o.st/conf/Server/Host @@ -0,0 +1 @@ +irc.h-o.st diff --git a/ngircd/irc.h-o.st/data/motd b/ngircd/irc.h-o.st/data/motd @@ -0,0 +1,44 @@ +@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ +@@ This server is not ready yet, visit https://cyberia.uptime.party/ @@ +@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ + + __,--- + ,-' / + / , , /_ _ __ . ___ + / / / / \ ,'_| /' / ,' / + \____\ /_ /__,'_\__ / __ /__\__/___ __ _ + \/ + ____/ + +Welcome to CyberiaIRC! + +This is irc.h-o.st, listening on port 6697 (TLS) + +Terms of Service: + - No spamming or flooding + - No clones or malicious bots + - No takeovers + - Do not distribute child pornography + - Do not harass other users + + We reserve the right to remove your access to this server and network + at any time at our opers discretion. + + Please be aware of our privacy policy. Disconnect now if you do not + consent to it. http://cyberia.is/transparency/irc/privacy_policy.txt + + The privacy policy is also available via Tor. + occgshn6gz4je57wyhpijni7waod6yxpxwihjdxjwrnpjtbayliei2id.onion + +Opers: + - iiost + +First steps: + - Find an existing IRC channel on this network: /list + - Join an IRC channel or create your own: /join <#channel> + +Getting help: + - Helpdesk on using IRC: /join #help + - Network issues and oper queries: /join #noc + - Specific issues with this server: /query jost + diff --git a/ngircd/tls/conf/SSL/CipherList b/ngircd/tls/conf/SSL/CipherList @@ -0,0 +1 @@ +ECDH+AESGCM:ECDH+CHACHA20:DH+AESGCM:ECDH+AES256:DH+AES256:ECDH+AES128:DH+AES:RSA+AESGCM:RSA+AES:!aNULL:!MD5:!DSS diff --git a/ngircd/tls/conf/SSL/DHFile b/ngircd/tls/conf/SSL/DHFile @@ -0,0 +1 @@ +/etc/ssl/dhparam.pem diff --git a/ngircd/tls/conf/SSL/Ports b/ngircd/tls/conf/SSL/Ports @@ -0,0 +1 @@ +6697 diff --git a/ntpclient/default/env/BIND b/ntpclient/default/env/BIND @@ -0,0 +1 @@ +pool.ntp.org diff --git a/ntpclient/default/run b/ntpclient/default/run @@ -0,0 +1,9 @@ +#!/usr/bin/env execlineb +fdmove -c 2 1 +s6-envdir env + +multisubstitute { + importas BIND BIND +} + +ntpclient -h $BIND diff --git a/ntpclient/default/type b/ntpclient/default/type @@ -0,0 +1 @@ +longrun diff --git a/opentracker/default/env/USER b/opentracker/default/env/USER @@ -0,0 +1 @@ +opentracker diff --git a/opentracker/default/run b/opentracker/default/run @@ -0,0 +1,4 @@ +#!/usr/bin/env execlineb +fdmove -c 2 1 + +opentracker -d /var/opentracker diff --git a/opentracker/default/type b/opentracker/default/type @@ -0,0 +1 @@ +longrun diff --git a/pjsua/default/conf/auto-play b/pjsua/default/conf/auto-play @@ -0,0 +1 @@ + diff --git a/pjsua/default/conf/cli-telnet-port b/pjsua/default/conf/cli-telnet-port @@ -0,0 +1 @@ +5555 diff --git a/pjsua/default/conf/no-cli-console b/pjsua/default/conf/no-cli-console diff --git a/pjsua/default/conf/realm b/pjsua/default/conf/realm @@ -0,0 +1 @@ +* diff --git a/pjsua/default/conf/use-cli b/pjsua/default/conf/use-cli diff --git a/pjsua/default/env/USER b/pjsua/default/env/USER @@ -0,0 +1 @@ +sip diff --git a/pjsua/default/run b/pjsua/default/run @@ -0,0 +1,4 @@ +#!/usr/bin/env execlineb +fdmove -c 2 1 + +pjsua --config-file data/conf diff --git a/pjsua/default/setup b/pjsua/default/setup @@ -0,0 +1,14 @@ +#!/usr/bin/env execlineb + +if { mkdir -p data } +redirfd -w 1 data/conf + +forbacktickx -n -o 0 x { ls conf } +importas var x + +redirfd -r 0 conf/${var} +withstdinas -n x +importas x x + +pipeline { printf "--%s %s\n" ${var} ${x} } +sed "s/ *$//" diff --git a/pjsua/default/type b/pjsua/default/type @@ -0,0 +1 @@ +longrun diff --git a/pjsua/iptel.org/conf/id b/pjsua/iptel.org/conf/id @@ -0,0 +1 @@ +sip:josuah@iptel.org diff --git a/pjsua/iptel.org/conf/password b/pjsua/iptel.org/conf/password @@ -0,0 +1 @@ +7NHkSBZoOtjoNH57JmtUWLRmUPF+bNSjXS9bpSCseJvNlVWv9/wxR6c4e0GjSjpf diff --git a/pjsua/iptel.org/conf/registrar b/pjsua/iptel.org/conf/registrar @@ -0,0 +1 @@ +sip:iptel.org diff --git a/pjsua/iptel.org/conf/username b/pjsua/iptel.org/conf/username @@ -0,0 +1 @@ +josuah diff --git a/pjsua/log/env/SERVICE b/pjsua/log/env/SERVICE diff --git a/pjsua/log/run b/pjsua/log/run @@ -0,0 +1,9 @@ +#!/usr/bin/env execlineb +fdmove -c 2 1 +s6-envdir env + +multisubstitute { + importas SERVICE SERVICE +} + +s6-log -bp -- /var/log/$SERVICE diff --git a/pjsua/log/type b/pjsua/log/type @@ -0,0 +1 @@ +longrun diff --git a/qemu/default/env/DISPLAY b/qemu/default/env/DISPLAY @@ -0,0 +1 @@ +none diff --git a/qemu/default/env/MAC b/qemu/default/env/MAC @@ -0,0 +1 @@ +52:54:00:00:00:00 diff --git a/qemu/default/env/MEM b/qemu/default/env/MEM @@ -0,0 +1 @@ +333m diff --git a/qemu/default/env/NAME b/qemu/default/env/NAME @@ -0,0 +1 @@ +vm diff --git a/qemu/default/env/ROOT b/qemu/default/env/ROOT @@ -0,0 +1 @@ +/var/iso diff --git a/qemu/default/env/USER b/qemu/default/env/USER @@ -0,0 +1 @@ +vm diff --git a/qemu/default/type b/qemu/default/type @@ -0,0 +1 @@ +longrun diff --git a/qemu/net-tap/run b/qemu/net-tap/run @@ -0,0 +1,27 @@ +#!/usr/bin/env execlineb +fdmove -c 2 1 + +multisubstitute { + importas NAME NAME + importas MEM MEM + importas MAC MAC + importas DISPLAY DISPLAY + importas ROOT ROOT +} + +# qemu without networking services, using a tap ethernet device +# +# The virtual machine main interface (nic,vlan=0) is communicating +# through a tap device (tap,vlan=0) in the host that is not connected to +# anything yet. A bridge needs to be setup between this interface and +# anything it needs to connect to. + +qemu-system-x86_64 + -name $NAME + -m $MEM + -netdev tap,id=nd0,ifname=tap0,script=no,downscript=no + -device virtio-net,netdev=nd0,mac=$MAC + -display $DISPLAY + $ROOT/$NAME.iso + +# -display # none # curses # vnc=0.0.0.0:0 # diff --git a/qemu/net-user/env/PORT_SSH b/qemu/net-user/env/PORT_SSH @@ -0,0 +1 @@ +10000 diff --git a/qemu/net-user/run b/qemu/net-user/run @@ -0,0 +1,27 @@ +#!/usr/bin/env execlineb +fdmove -c 2 1 +s6-envdir env + +multisubstitute { + importas NAME NAME + importas MEM MEM + importas MAC MAC + importas DISPLAY DISPLAY + importas ROOT ROOT + importas PORT_SSH PORT_SSH +} + +# qemu with networking in user mode: managed by qemu +# +# The virtual machine communicates with the hypervisor, which setups +# a lot of servers (dns, tftp, dhcp...) for ease of use. + +qemu-system-x86_64 + -name $NAME + -m $MEM + -netdev user,id=nd0,hostfwd=tcp::10000-:22 + -device e1000,netdev=nd0 + -display $DISPLAY + $ROOT/$NAME.iso + +# -display # none # curses # vnc=0.0.0.0:0 # diff --git a/qmail-pop3d/default/env/BIND b/qmail-pop3d/default/env/BIND @@ -0,0 +1 @@ +josuah.net diff --git a/qmail-pop3d/default/env/CERTFILE b/qmail-pop3d/default/env/CERTFILE @@ -0,0 +1 @@ +/var/s6/snooze-tls-cert/data/pem diff --git a/qmail-pop3d/default/env/KEYFILE b/qmail-pop3d/default/env/KEYFILE @@ -0,0 +1 @@ +/var/s6/snooze-tls-cert/data/key diff --git a/qmail-pop3d/default/env/MAILDIR b/qmail-pop3d/default/env/MAILDIR @@ -0,0 +1 @@ +./mail/INBOX/ diff --git a/qmail-pop3d/default/env/PORT b/qmail-pop3d/default/env/PORT @@ -0,0 +1 @@ +995 diff --git a/qmail-pop3d/default/run b/qmail-pop3d/default/run @@ -0,0 +1,12 @@ +#!/usr/bin/env execlineb +fdmove -c 2 1 +s6-envdir env + +multisubstitute { + importas BIND BIND + importas PORT PORT + importas MAILDIR MAILDIR +} + +s6-tlsserver $BIND $PORT +qmail-popup $BIND checkpassword qmail-pop3d $MAILDIR diff --git a/qmail-pop3d/default/type b/qmail-pop3d/default/type @@ -0,0 +1 @@ +longrun diff --git a/qmail-send/default/conf/control/locals b/qmail-send/default/conf/control/locals @@ -0,0 +1 @@ +localhost diff --git a/qmail-send/default/conf/control/me b/qmail-send/default/conf/control/me @@ -0,0 +1 @@ +localhost diff --git a/qmail-send/default/env/GROUP b/qmail-send/default/env/GROUP @@ -0,0 +1 @@ +sqmail diff --git a/qmail-send/default/env/MAILDIR b/qmail-send/default/env/MAILDIR @@ -0,0 +1 @@ +./mail/INBOX/ diff --git a/qmail-send/default/env/USER b/qmail-send/default/env/USER @@ -0,0 +1 @@ +root diff --git a/qmail-send/default/run b/qmail-send/default/run @@ -0,0 +1,9 @@ +#!/usr/bin/env execlineb +fdmove -c 2 1 +s6-envdir env + +multisubstitute { + importas MAILDIR MAILDIR +} + +qmail-start $MAILDIR diff --git a/qmail-send/default/setup b/qmail-send/default/setup @@ -0,0 +1,84 @@ +#!/usr/bin/env execlineb + +ifthenelse { test -f conf/control/authsenders } { + ifte { mv conf/control/authsenders.tmp conf/control/authsenders } { exit 1 } + redirfd -r 0 conf/control/authsenders + redirfd -w 1 conf/control/authsenders.tmp + + forstdin -n x + importas line x + + if { printf "%s" ${line} } + + backtick -n x { heredoc 0 ${line} sed -r "s,^[^:]*:,,; s,(;[0-9]+)?[|],/,; s,[|]$,,; " } + importas relay/sender x + + pass smtp/${relay/sender} +} { } + +if { s6-hiercopy conf /var/qmail } + +cd /var/qmail + +if { chgrp -RL sqmail . } + +if { chown qmailq bin/qmail-queue } +if { chmod 4711 bin/qmail-queue } +if { chmod 6711 bin/qmail-authuser } +if { chmod 6711 bin/qmail-vmailuser } + +if { chown -RL alias alias } +if { find alias -type d -exec chmod 750 {} + } +if { find alias -type f -exec chmod 640 {} + } + +if { chown -RL root control } +if { find control -type d -exec chmod 750 {} + } +if { find control -type f -exec chmod 640 {} + } +if { chmod 755 control } +if { chmod 644 control/me } + +if { chown qmailq queue } +if { chmod 750 queue } + +if { chown -RL qmails queue/bounce } +if { find queue/bounce -type d -exec chmod 700 {} + } +if { find queue/bounce -type f -exec chmod 600 {} + } + +if { chown -RL qmails queue/info } +if { find queue/info -type d -exec chmod 700 {} + } +if { find queue/info -type f -exec chmod 600 {} + } + +if { chown -RL qmailq queue/intd } +if { find queue/intd -type d -exec chmod 700 {} + } +if { find queue/intd -type f -exec chmod 600 {} + } + +if { chown -RL qmails queue/local } +if { find queue/local -type d -exec chmod 700 {} + } +if { find queue/local -type f -exec chmod 600 {} + } + +if { chown qmailq queue/lock } +if { chmod 750 queue/lock } + +if { chown -RL qmails queue/lock/sendmutex } +if { chmod 600 queue/lock/sendmutex } + +if { chown qmailr queue/lock/tcpto } +if { chmod 644 queue/lock/tcpto } + +if { chown -RL qmails queue/lock/trigger } +if { chmod 622 queue/lock/trigger } + +if { chown -RL qmailq queue/mess } +if { find queue/mess -type d -exec chmod 750 {} + } +if { find queue/mess -type f -exec chmod 640 {} + } + +if { chown -RL qmailq queue/pid } +if { chmod 700 queue/pid } + +if { chown -RL qmails queue/remote } +if { find queue/remote -type d -exec chmod 700 {} + } +if { find queue/remote -type f -exec chmod 600 {} + } + +if { chown -RL qmailq queue/todo } +if { find queue/todo -type d -exec chmod 750 {} + } +if { find queue/todo -type f -exec chmod 640 {} + } diff --git a/qmail-send/default/type b/qmail-send/default/type @@ -0,0 +1 @@ +longrun diff --git a/qmail-send/josuah.net/conf/alias/.qmail-abuse b/qmail-send/josuah.net/conf/alias/.qmail-abuse @@ -0,0 +1 @@ +josuah diff --git a/qmail-send/josuah.net/conf/alias/.qmail-default b/qmail-send/josuah.net/conf/alias/.qmail-default @@ -0,0 +1 @@ +josuah diff --git a/qmail-send/josuah.net/conf/alias/.qmail-mailer-daemon b/qmail-send/josuah.net/conf/alias/.qmail-mailer-daemon @@ -0,0 +1 @@ +josuah diff --git a/qmail-send/josuah.net/conf/alias/.qmail-postmaster b/qmail-send/josuah.net/conf/alias/.qmail-postmaster @@ -0,0 +1 @@ +josuah diff --git a/qmail-send/josuah.net/conf/alias/.qmail-root b/qmail-send/josuah.net/conf/alias/.qmail-root @@ -0,0 +1 @@ +josuah diff --git a/qmail-send/josuah.net/conf/control/authsenders b/qmail-send/josuah.net/conf/control/authsenders @@ -0,0 +1 @@ +:mail.gandi.net|mail@josuah.net| diff --git a/qmail-send/josuah.net/conf/control/locals b/qmail-send/josuah.net/conf/control/locals @@ -0,0 +1,2 @@ +localhost +josuah.net diff --git a/qmail-send/josuah.net/conf/control/me b/qmail-send/josuah.net/conf/control/me @@ -0,0 +1 @@ +josuah.net diff --git a/qmail-send/josuah.net/conf/control/tlsdestinations b/qmail-send/josuah.net/conf/control/tlsdestinations @@ -0,0 +1,2 @@ +%smtp-relay.gmail.com:=8CDB62841CDD7B670E58C01BA6D801B484DA2836||;465 +%mail.gandi.net:=D083133D99990F800AB558C451271381458E74F0||;465 diff --git a/qmail-smtpd/default/conf/control/badloadertypes b/qmail-smtpd/default/conf/control/badloadertypes @@ -0,0 +1,4 @@ +Mi5kb +MzIuZ +MyLmR +MyLkR diff --git a/qmail-smtpd/default/conf/control/badmailfrom b/qmail-smtpd/default/conf/control/badmailfrom @@ -0,0 +1,5 @@ +# Wildmat evaluates from least specific to most specific +* +! +!*@*.* +*%* diff --git a/qmail-smtpd/default/conf/control/badmimetypes b/qmail-smtpd/default/conf/control/badmimetypes @@ -0,0 +1,12 @@ +TVqQAAMAA +TVpQAAIAA +TVpAALQAc +TVpyAXkAX +TVrmAU4AA +TVrhARwAk +TVoFAQUAA +TVoAAAQAA +TVoIARMAA +TVouARsAA +TVrQAT8AA +TVoAAAEAA diff --git a/qmail-smtpd/default/conf/control/badrcptto b/qmail-smtpd/default/conf/control/badrcptto @@ -0,0 +1,4 @@ +# Wildmat evaluates from least specifc to most specific +*%* +*\ *@* +!*@*.* diff --git a/qmail-smtpd/default/conf/control/databytes b/qmail-smtpd/default/conf/control/databytes diff --git a/qmail-smtpd/default/conf/control/rcpthosts b/qmail-smtpd/default/conf/control/rcpthosts diff --git a/qmail-smtpd/default/conf/control/timeoutsmtpd b/qmail-smtpd/default/conf/control/timeoutsmtpd diff --git a/qmail-smtpd/default/env/BIND b/qmail-smtpd/default/env/BIND @@ -0,0 +1 @@ +0.0.0.0 diff --git a/qmail-smtpd/default/run b/qmail-smtpd/default/run @@ -0,0 +1,17 @@ +#!/usr/bin/env execlineb +fdmove -c 2 1 +s6-envdir env + +multisubstitute { + importas USER USER + importas BIND BIND + importas SERVER SERVER + importas PORT PORT + importas -s -d "\n" RBL_REFUSE RBL_REFUSE + importas -s -d "\n" RBL_ACCEPT RBL_ACCEPT +} + +s6-envuidgid ${USER} +${SERVER} -U ${BIND} ${PORT} +rblsmtpd -r${RBL_REFUSE} -a${RBL_ACCEPT} +qmail-smtpd diff --git a/qmail-smtpd/default/setup b/qmail-smtpd/default/setup @@ -0,0 +1,3 @@ +#!/usr/bin/env execlineb + +s6-hiercopy conf /var/qmail diff --git a/qmail-smtpd/default/type b/qmail-smtpd/default/type @@ -0,0 +1 @@ +longrun diff --git a/qmail-smtpd/josuah.net/conf/control/rcpthosts b/qmail-smtpd/josuah.net/conf/control/rcpthosts @@ -0,0 +1 @@ +josuah.net diff --git a/qmail-smtpd/josuah.net/env/CERTFILE b/qmail-smtpd/josuah.net/env/CERTFILE @@ -0,0 +1 @@ +/etc/ssl/josuah.net/fullchain.pem diff --git a/qmail-smtpd/josuah.net/env/KEYFILE b/qmail-smtpd/josuah.net/env/KEYFILE @@ -0,0 +1 @@ +/etc/ssl/josuah.net/privkey.pem diff --git a/qmail-smtpd/log/env/SERVICE b/qmail-smtpd/log/env/SERVICE diff --git a/qmail-smtpd/log/run b/qmail-smtpd/log/run @@ -0,0 +1,9 @@ +#!/usr/bin/env execlineb +fdmove -c 2 1 +s6-envdir env + +importas SERVICE SERVICE + +s6-log -b + -^ +" fatal: " 1 + f t /var/log/$SERVICE diff --git a/qmail-smtpd/log/type b/qmail-smtpd/log/type @@ -0,0 +1 @@ +longrun diff --git a/qmail-smtpd/tcp/env/PORT b/qmail-smtpd/tcp/env/PORT @@ -0,0 +1 @@ +25 diff --git a/qmail-smtpd/tcp/env/SERVER b/qmail-smtpd/tcp/env/SERVER @@ -0,0 +1 @@ +s6-tcpserver diff --git a/qmail-smtpd/tls/env/CERTFILE b/qmail-smtpd/tls/env/CERTFILE diff --git a/qmail-smtpd/tls/env/KEYFILE b/qmail-smtpd/tls/env/KEYFILE diff --git a/qmail-smtpd/tls/env/PORT b/qmail-smtpd/tls/env/PORT @@ -0,0 +1 @@ +465 diff --git a/qmail-smtpd/tls/env/SERVER b/qmail-smtpd/tls/env/SERVER @@ -0,0 +1 @@ +s6-tlsserver diff --git a/ratox/default/run b/ratox/default/run @@ -0,0 +1,14 @@ +#!/usr/bin/env execlineb +fdmove -c 2 1 + +multisubstitute { + importas USER USER +} + +s6-setuidgid ${USER} + +backtick home { homeof ${USER} } +if { mkdir -p $home/tox } +cd $home/tox + +ratox diff --git a/ratox/default/type b/ratox/default/type @@ -0,0 +1 @@ +longrun diff --git a/ratox/josuah/env/USER b/ratox/josuah/env/USER @@ -0,0 +1 @@ +josuah diff --git a/sndiod/default/env/BIND b/sndiod/default/env/BIND @@ -0,0 +1 @@ +127.0.0.1 diff --git a/sndiod/default/env/USER b/sndiod/default/env/USER @@ -0,0 +1 @@ +audio diff --git a/sndiod/default/run b/sndiod/default/run @@ -0,0 +1,9 @@ +#!/usr/bin/env execlineb +fdmove -c 2 1 +s6-envdir env + +multisubstitute { + importas BIND BIND +} + +sndiod -d -L ${BIND} -s default diff --git a/sndiod/default/type b/sndiod/default/type @@ -0,0 +1 @@ +longrun diff --git a/ssh-agent/default/run b/ssh-agent/default/run @@ -0,0 +1,14 @@ +#!/usr/bin/env execlineb +fdmove -c 2 1 +s6-envdir env + +multisubstitute { + importas USER USER +} + +backtick -n x { homeof ${USER} } +importas HOME x + +if { rm -f "${HOME}/.ssh/auth.sock" } +s6-setuidgid ${USER} +ssh-agent -d -a "${HOME}/.ssh/auth.sock" diff --git a/ssh-agent/default/type b/ssh-agent/default/type @@ -0,0 +1 @@ +longrun diff --git a/ssh-agent/josuah/env/USER b/ssh-agent/josuah/env/USER @@ -0,0 +1 @@ +josuah diff --git a/ssh-agent/root/env/USER b/ssh-agent/root/env/USER @@ -0,0 +1 @@ +root diff --git a/tapio/client/run b/tapio/client/run @@ -0,0 +1,13 @@ +#!/usr/bin/env execlineb +fdmove -c 2 1 + +multisubstitute { + importas HOST HOST + importas PORT PORT + importas IFACE IFACE + importas MODE MODE +} + +s6-tcpclient $HOST $PORT +fdmove 0 6 fdmove 1 7 +tapio $IFACE mode $MODE diff --git a/tapio/default/env/IFACE b/tapio/default/env/IFACE @@ -0,0 +1 @@ +tun0 diff --git a/tapio/default/env/MODE b/tapio/default/env/MODE @@ -0,0 +1 @@ +tun diff --git a/tapio/default/env/PORT b/tapio/default/env/PORT @@ -0,0 +1 @@ +5555 diff --git a/tapio/default/env/USER b/tapio/default/env/USER @@ -0,0 +1 @@ +vpn diff --git a/tapio/default/type b/tapio/default/type @@ -0,0 +1 @@ +longrun diff --git a/tapio/server/env/BIND b/tapio/server/env/BIND @@ -0,0 +1 @@ +0.0.0.0 diff --git a/tapio/server/run b/tapio/server/run @@ -0,0 +1,13 @@ +#!/usr/bin/env execlineb +fdmove -c 2 1 +s6-envdir env + +multisubstitute { + importas BIND BIND + importas PORT PORT + importas MODE MODE + importas IFACE IFACE +} + +s6-tcpserver $BIND $PORT +tapio $IFACE mode $MODE diff --git a/test/current b/test/current @@ -0,0 +1 @@ +asdf diff --git a/test/lock b/test/lock diff --git a/test/state b/test/state diff --git a/tinc/default/data/conf.d/common.conf b/tinc/default/data/conf.d/common.conf @@ -0,0 +1,2 @@ +DeviceStandby = no +PingTimeout = 15 diff --git a/tinc/default/data/tinc-up b/tinc/default/data/tinc-up @@ -0,0 +1,11 @@ +#!/bin/sh -ex + +case $(uname) in +(*BSD) + ifconfig "$INTERFACE" "$(tinc -c . get subnet)" netmask 255.255.255.0 + ;; +(Linux) + ip link set "$INTERFACE" up + ip addr add "$(tinc -c . get subnet | sed q)/24" dev "$INTERFACE" + ;; +esac diff --git a/tinc/default/env/USER b/tinc/default/env/USER @@ -0,0 +1 @@ +vpn diff --git a/tinc/default/run b/tinc/default/run @@ -0,0 +1,4 @@ +#!/usr/bin/env execlineb +fdmove -c 2 1 + +tincd -D -d 5 --config=data --pidfile=pid diff --git a/tinc/default/type b/tinc/default/type @@ -0,0 +1 @@ +longrun diff --git a/tinc/josuah.net/data/hosts/kroa b/tinc/josuah.net/data/hosts/kroa @@ -0,0 +1,13 @@ +Address = kroa.josuah.net +Subnet = 172.16.55.5 +Port = 6655 + +-----BEGIN RSA PUBLIC KEY----- +MIIBCgKCAQEAmnT1YEcPTOiaa/GfWsFF1p3Qo/xeIjIb6e/cG62nKcjJSS+L3G+P +VUFOT7YfRdggzWDAMvxdAq5+DFcg2v3iDm8yTcv8ITaSKHFp4Tarkl2zEs5VELVY +mcPrYI99oyo9xiXh+x1G9/wp+uKxgoeU4m0+iNwyZw7ypoIgJhx8TfT7rgaXmyNX +HDBu/hBH7orTF3TMRp/VrWqD8UQyD0tK1gGQe4WIQJqouPxd44O8tKRgtha69q42 +kZ92DuFHLjTkYFjt4WKGEUAdja+aqbk5QeNyoOHtw9VkTIJcWShwPTYj0Ykdm/BS +oyBpV8pID+xWz81lpMilfanlPjgmzc6UvQIDAQAB +-----END RSA PUBLIC KEY----- +Ed25519PublicKey = UzE1NtmdKv3MWpslesWIT4/AB3a8WZX+AP/2suMRUnK diff --git a/tinc/josuah.net/data/hosts/nas b/tinc/josuah.net/data/hosts/nas @@ -0,0 +1,13 @@ +Address = nas.josuah.net +Subnet = 172.16.55.2 +Port = 655 + +-----BEGIN RSA PUBLIC KEY----- +MIIBCgKCAQEAxFl/zn8owPVa0EBaazQaUck0ImV3+VS9+jOs0tePcQxuYHtX94dm +ZlYADJP/TaN8IEezQcgm2+iyavoOEBTCKhQ7/mYqG6UI2bcZjtu5UFl37YUJEYHN +dhvrhJwoYOWTFSu/d+UT/k8tFxoW308AXxqmb85egSBg8zaekrS7ibBSMi+AVaAz +g/Me+qgWh2j6jGh55Av1JeJ+1trlRLIvMRDwPe0U4hRjEZ/nBXFQS67AW1qg2tSF +3ieQgIr12FyZMw3ieWKiUW3JShdYRRMnV8hfKsn98R8LOirXBY2nCqRkWvKjYyY6 +bN2MzG57jdprYDR4ljglDFaXsNCDFgWTXwIDAQAB +-----END RSA PUBLIC KEY----- +Ed25519PublicKey = QbVvGg+CgFHyzWzbmG4hpY7Kus3kMZean2Vj52v2roN diff --git a/tinc/josuah.net/data/hosts/pdmg b/tinc/josuah.net/data/hosts/pdmg @@ -0,0 +1,12 @@ +Subnet = 172.16.55.4 +Port = 655 + +-----BEGIN RSA PUBLIC KEY----- +MIIBCgKCAQEAxnCPtS3uHC8ZwZCDDPpDZWfuQF2PP1GdqHAF7pmk1mXCfapSVU/I +5gVP7scrbSKhNXpeQvgfRk7BQ+O1TpvhYDJRR6/xlACbaWeoFIQLbBMik10Dvw7k +Zrt/cnF8WTdEgQ52GIhwJhc/ZoBQHLfoAPZrD3lyTG4PQb/VyouQVJq8JgthHgIi +u3jz3meiB292rz9kg+wafl7YVsvWQZMK3CAHWjKLOaSNFYM6zkZU42v5d2mkC1aT +JowYMn0GRTKL4IC2WkzAt1JNK5Hd8YexdKBfqmobZI+SevlPYVkZLM7jmcTR7836 +bdBZF/tZpvRUY7eHSwVni576SwO+zakt3wIDAQAB +-----END RSA PUBLIC KEY----- +Ed25519PublicKey = 5ooarAS0cWAxPQ6q2wn/1ZvhLYuz6ZRSJGZFFMMeZBF diff --git a/tinc/josuah.net/data/hosts/rpi b/tinc/josuah.net/data/hosts/rpi @@ -0,0 +1,13 @@ +Address = rpi.josuah.net +Subnet = 172.16.55.3 +Port = 655 + +-----BEGIN RSA PUBLIC KEY----- +MIIBCgKCAQEA35oN9yPu+lF7ZmphYandl896xjKYnNjIn5UB4gGvfbBEEA3kKYev +6Z4ApOvw2AgQ3WVbAynG3KbNj5jsCBBG8M9PfSPeFn4jpjycDqORi3sW6z3MQHfZ +u61jif16QtuuwXtrTiWO+MEVmSsCH9Vxtq5L6qJHZA7pEkQMxu/aEjOpYdpwZb/M +AnO7TU+PzTjUte40sfrIczHHkpDh8CdS1mKseF1XcNBhUANB7F6hQwhwD96GdGer +ioqMpltyyXMz4oZvhV+LD/jVOUXD1FZjiqO5TNtCFXYDLF/gxq/vmQ84eDo/I3Mo +E7wbHst5mOSRLBUP9cCAys/r6+JAdg+LfwIDAQAB +-----END RSA PUBLIC KEY----- +Ed25519PublicKey = Zsy56fH9Hbd/qiRWRy/7YEKv4eQUPI1o+3iXs8lHN1N diff --git a/tinc/josuah.net/data/hosts/t470s b/tinc/josuah.net/data/hosts/t470s @@ -0,0 +1,12 @@ +Subnet = 172.16.55.1 + +Port = 12196 +-----BEGIN RSA PUBLIC KEY----- +MIIBCgKCAQEAs99vlkaTp2BWltxN5KiBMkH/fHV1O3DWARK6ojFlhgENdmGjDxxk +0rshmaAvSjZ3uU2z+QkUIpovqEZf5I5abrAu1yKyMTIMFwqasa5D3TSkcePf+dD7 +LIr/YBWPl6kxHrNd2s3qPXBoYNaTBX7CCdXla7Rlz1/EnkMCfSLLd6YQsaCR4MsE +dwgR17bu5MsvB9YNLvbkqHHZCwvwIHrvX8dxvCr1BZwHAt/SDwg0nnTD2YNBUUl+ +SsXzMNfKiEjqmfHGfzMmP9Q9yjM6W5YAr+/Y7OPb/LnsPbYNC1L5YqaKskM431JU +vcpAPqjRJTvo+ji4hKrKdRal6tE61ZUW4wIDAQAB +-----END RSA PUBLIC KEY----- +Ed25519PublicKey = Wnd7bglt6wxqz/QJT1KH9wajs2LUUnMTHTDSU7/SsQM diff --git a/tinydns/default/env/IP b/tinydns/default/env/IP @@ -0,0 +1 @@ +0.0.0.0 diff --git a/tinydns/default/env/ROOT b/tinydns/default/env/ROOT @@ -0,0 +1 @@ +data diff --git a/tinydns/default/env/USER b/tinydns/default/env/USER @@ -0,0 +1 @@ +dns diff --git a/tinydns/default/run b/tinydns/default/run @@ -0,0 +1,10 @@ +#!/usr/bin/env execlineb +fdmove -c 2 1 +s6-envdir env + +multisubstitute { + importas USER USER +} + +s6-envuidgid ${USER} +tinydns diff --git a/tinydns/default/setup b/tinydns/default/setup @@ -0,0 +1,60 @@ +#!/usr/bin/env execlineb + +if { mkdir -p data } +if { touch data/data } + +ifte { cd data tinydns-data } { exit 1 } + +cd conf + +forbacktickx -o 0 -d "\n" x { ls } +importas -n type x +cd ${type} + +forbacktickx -o 0 -d "\n" x { elglob x * find -L ${x} -type f -o -type l } +importas path x + +# transform top/mid/low to low.mid.top +backtick -n x { + heredoc 0 ${path} + pipeline { tr "/" "\n" } + pipeline { sed "1!G;h;$!d" } + pipeline { tr "\n" "." } + sed "s/\\.$//; s/^@.//" +} +importas -n name x + +forbacktickx -o 0 -d "\n" x { cat ${path} } +importas content x + +if { printf "%-6s %-30s %s\n" ${type} ${name} ${content} } + +ifelse { test ${type} = txt } { + # encode to octal: "\254\055\301\006\241\062\046\102" + backtick x { + pipeline { od -An -t oC } + pipeline { sed -r " + s/$/ / + s/ ([0-9][0-9]) / 0\\1 /g + s/ ([0-9]) / 00\\1 /g + s/ *$// + s/ +/\\\\/g + " } + tr -d "\n" + } + importas text x + redirfd -a 1 ../../data/data echo "'${name}:${text}" +} + +ifelse { heredoc 0 ${type} grep -Eq "^[0-9]+$" } { + redirfd -a 1 data/data + echo ":${type}:${name}:${content}" +} + +cd ../../data + +ifelse { heredoc 0 ${content} grep -vq : } + { tinydns-edit data data.new add ${type} ${name} ${content} } + +ifelse -n { if -n { test ${type} = host } if -n { test ${type} = alias } } + { tinydns-edit data data.new add ${type}6 ${name} ${content} } diff --git a/tinydns/default/type b/tinydns/default/type @@ -0,0 +1 @@ +longrun diff --git a/tinydns/h-o.st/conf/alias/h-o.st/@ b/tinydns/h-o.st/conf/alias/h-o.st/@ @@ -0,0 +1 @@ +../../host/h-o.st/glaphyrae+ \ No newline at end of file diff --git a/tinydns/h-o.st/conf/alias/h-o.st/g b/tinydns/h-o.st/conf/alias/h-o.st/g @@ -0,0 +1 @@ +../../host/h-o.st/glaphyrae+ \ No newline at end of file diff --git a/tinydns/h-o.st/conf/alias/h-o.st/git b/tinydns/h-o.st/conf/alias/h-o.st/git @@ -0,0 +1 @@ +../../host/h-o.st/glaphyrae+ \ No newline at end of file diff --git a/tinydns/h-o.st/conf/alias/h-o.st/mac/54e1ad43a3a4 b/tinydns/h-o.st/conf/alias/h-o.st/mac/54e1ad43a3a4 @@ -0,0 +1 @@ +../../../host/h-o.st/glaphyrae+ \ No newline at end of file diff --git a/tinydns/h-o.st/conf/alias/himalaya-solaire.org/@ b/tinydns/h-o.st/conf/alias/himalaya-solaire.org/@ @@ -0,0 +1 @@ +../../host/h-o.st/glaphyrae+ \ No newline at end of file diff --git a/tinydns/h-o.st/conf/alias/josuah.net/@ b/tinydns/h-o.st/conf/alias/josuah.net/@ @@ -0,0 +1 @@ +../../host/h-o.st/glaphyrae+ \ No newline at end of file diff --git a/tinydns/h-o.st/conf/alias/josuah.net/git b/tinydns/h-o.st/conf/alias/josuah.net/git @@ -0,0 +1 @@ +../../host/h-o.st/glaphyrae+ \ No newline at end of file diff --git a/tinydns/h-o.st/conf/alias/josuah.net/irc b/tinydns/h-o.st/conf/alias/josuah.net/irc @@ -0,0 +1 @@ +../../host/h-o.st/glaphyrae+ \ No newline at end of file diff --git a/tinydns/h-o.st/conf/host/h-o.st/glaphyrae b/tinydns/h-o.st/conf/host/h-o.st/glaphyrae @@ -0,0 +1,2 @@ +199.247.28.162 +2001:19f0:5001:7ac:5400:01ff:fe90:7c33 diff --git a/tinydns/h-o.st/conf/ns/h-o.st b/tinydns/h-o.st/conf/ns/h-o.st @@ -0,0 +1 @@ +../host/h-o.st/glaphyrae+ \ No newline at end of file diff --git a/tinydns/h-o.st/conf/ns/himalaya-solaire.org b/tinydns/h-o.st/conf/ns/himalaya-solaire.org @@ -0,0 +1 @@ +../host/h-o.st/glaphyrae+ \ No newline at end of file diff --git a/tinydns/h-o.st/conf/ns/josuah.net b/tinydns/h-o.st/conf/ns/josuah.net @@ -0,0 +1 @@ +../host/h-o.st/glaphyrae+ \ No newline at end of file diff --git a/tinydns/h-o.st/conf/txt/h-o.st b/tinydns/h-o.st/conf/txt/h-o.st @@ -0,0 +1 @@ +v=spf1 mx -all diff --git a/tinydns/h-o.st/conf/txt/himalaya-solaire.org b/tinydns/h-o.st/conf/txt/himalaya-solaire.org @@ -0,0 +1 @@ +v=spf1 include:_mailcust.gandi.net ?all diff --git a/tinydns/h-o.st/conf/txt/josuah.net b/tinydns/h-o.st/conf/txt/josuah.net @@ -0,0 +1 @@ +v=spf1 mx -all diff --git a/tinysshd/default/env/BIND b/tinysshd/default/env/BIND @@ -0,0 +1 @@ +0.0.0.0 diff --git a/tinysshd/default/env/PORT b/tinysshd/default/env/PORT @@ -0,0 +1 @@ +22 diff --git a/tinysshd/default/run b/tinysshd/default/run @@ -0,0 +1,11 @@ +#!/usr/bin/env execlineb +fdmove -c 2 1 +s6-envdir env + +multisubstitute { + importas BIND BIND + importas PORT PORT +} + +s6-tcpserver $BIND $PORT +tinysshd -sovv data/key diff --git a/tinysshd/default/setup b/tinysshd/default/setup @@ -0,0 +1,5 @@ +#!/usr/bin/env execlineb + +if { mkdir -p data } +if { tinysshd-makekey data/key } +if { chmod 500 data/key } diff --git a/tinysshd/default/type b/tinysshd/default/type @@ -0,0 +1 @@ +longrun diff --git a/tor/default/conf/Log b/tor/default/conf/Log @@ -0,0 +1 @@ +debug stderr diff --git a/tor/default/conf/PIDFile b/tor/default/conf/PIDFile @@ -0,0 +1 @@ +pid diff --git a/tor/default/conf/RunAsDaemon b/tor/default/conf/RunAsDaemon @@ -0,0 +1 @@ +0 diff --git a/tor/default/conf/SOCKSPort b/tor/default/conf/SOCKSPort @@ -0,0 +1 @@ +0 diff --git a/tor/default/conf/User b/tor/default/conf/User @@ -0,0 +1 @@ +tor diff --git a/tor/default/env/USER b/tor/default/env/USER @@ -0,0 +1 @@ +tor diff --git a/tor/default/run b/tor/default/run @@ -0,0 +1,11 @@ +#!/usr/bin/env execlineb +fdmove -c 2 1 +s6-envdir env + +multisubstitute { + importas USER USER +} + +backtick -n HOME { homeof ${USER} } + +tor -f data/conf diff --git a/tor/default/setup b/tor/default/setup @@ -0,0 +1,24 @@ +#!/usr/bin/env execlineb + +if { mkdir -p data } +redirfd -w 1 data/conf + +cd conf + +if { + cd config + + forbacktickx x { ls } importas file x + if { printf "%-20s " $file } + cat $file +} + +if { + cd service + + forbacktickx x { ls } importas dir x + if { printf "\n## %s ##\n\n" $dir } + forbacktickx x { ls $dir } importas file x + if { printf "%-20s " $file } + cat ${dir}/${file} +} diff --git a/tor/default/type b/tor/default/type @@ -0,0 +1 @@ +longrun diff --git a/tor/gopher/conf/service/gopher/HiddenServiceDir b/tor/gopher/conf/service/gopher/HiddenServiceDir @@ -0,0 +1 @@ +/var/tor/gopher diff --git a/tor/gopher/conf/service/gopher/HiddenServicePort b/tor/gopher/conf/service/gopher/HiddenServicePort @@ -0,0 +1 @@ +70 diff --git a/tor/http/conf/service/http/HiddenServiceDir b/tor/http/conf/service/http/HiddenServiceDir @@ -0,0 +1 @@ +/var/tor/http diff --git a/tor/http/conf/service/http/HiddenServicePort b/tor/http/conf/service/http/HiddenServicePort @@ -0,0 +1 @@ +80 diff --git a/tor/icecast/conf/service/icecast/HiddenServiceDir b/tor/icecast/conf/service/icecast/HiddenServiceDir @@ -0,0 +1 @@ +/var/tor/icecast diff --git a/tor/icecast/conf/service/icecast/HiddenServicePort b/tor/icecast/conf/service/icecast/HiddenServicePort @@ -0,0 +1 @@ +3232 diff --git a/transmission/default/conf/b-incomplete-dir-enabled b/transmission/default/conf/b-incomplete-dir-enabled @@ -0,0 +1 @@ +true diff --git a/transmission/default/conf/b-rpc-authentication-required b/transmission/default/conf/b-rpc-authentication-required @@ -0,0 +1 @@ +false diff --git a/transmission/default/conf/n-peer-port b/transmission/default/conf/n-peer-port @@ -0,0 +1 @@ +51413 diff --git a/transmission/default/conf/n-rpc-port b/transmission/default/conf/n-rpc-port @@ -0,0 +1 @@ +9091 diff --git a/transmission/default/conf/s-bind-address-ipv4 b/transmission/default/conf/s-bind-address-ipv4 @@ -0,0 +1 @@ +0.0.0.0 diff --git a/transmission/default/conf/s-bind-address-ipv6 b/transmission/default/conf/s-bind-address-ipv6 @@ -0,0 +1 @@ +:: diff --git a/transmission/default/conf/s-download-dir b/transmission/default/conf/s-download-dir @@ -0,0 +1 @@ +/var/transmission/download diff --git a/transmission/default/conf/s-incomplete-dir b/transmission/default/conf/s-incomplete-dir @@ -0,0 +1 @@ +/var/transmission/incomplete diff --git a/transmission/default/conf/s-rpc-bind-address b/transmission/default/conf/s-rpc-bind-address @@ -0,0 +1 @@ +127.0.0.1 diff --git a/transmission/default/conf/s-rpc-url b/transmission/default/conf/s-rpc-url @@ -0,0 +1 @@ +/transmission/ diff --git a/transmission/default/env/USER b/transmission/default/env/USER @@ -0,0 +1 @@ +transmission diff --git a/transmission/default/run b/transmission/default/run @@ -0,0 +1,8 @@ +#!/usr/bin/env execlineb +fdmove -c 2 1 +multisubstitute { + importas USER USER +} + +s6-envuidgid ${USER} +transmission-daemon -f -g /var/transmission diff --git a/transmission/default/setup b/transmission/default/setup @@ -0,0 +1,27 @@ +#!/usr/bin/env execlineb + +if { mkdir -p /var/transmission/incomplete /var/transmission/download } +redirfd -w 1 /var/transmission/settings.json + +if { echo "{" } +ifte { echo "}" } { exit 1 } + +pipeline { + forbacktickx -n -d "\n" x { s6-ls conf } + importas t-var x + + redirfd -r 0 conf/${t-var} + withstdinas -n x + importas val x + + backtick -n x { heredoc 0 ${t-var} cut -d - -f 1 } + importas t x + + backtick -n x { heredoc 0 ${t-var} cut -d - -f 2- } + importas var x + + ifthenelse { test ${t} = s } + { printf "\t\"%s\": \"%s\",\n" ${var} ${val} } + { printf "\t\"%s\": %s,\n" ${var} ${val} } +} +sed "$ s/,$//" diff --git a/transmission/default/type b/transmission/default/type @@ -0,0 +1 @@ +longrun diff --git a/u9fs-mount/default/down b/u9fs-mount/default/down @@ -0,0 +1,4 @@ +#!/usr/local/bin/execlineb +# mount a 9p filesystem from a local UNIX socket + +umount /mnt/9p diff --git a/u9fs-mount/default/env/USER b/u9fs-mount/default/env/USER @@ -0,0 +1 @@ +9p diff --git a/u9fs-mount/default/producer-for b/u9fs-mount/default/producer-for @@ -0,0 +1 @@ +u9fs-mount-log diff --git a/u9fs-mount/default/type b/u9fs-mount/default/type @@ -0,0 +1 @@ +longrun diff --git a/u9fs-mount/default/up b/u9fs-mount/default/up @@ -0,0 +1,5 @@ +#!/usr/local/bin/execlineb +# mount a 9p filesystem from a local UNIX socket + +mkdir -p /mnt/9p +exec 9pfs -U /tmp/9p /mnt/9p diff --git a/u9fs-ssh/default/env/USER b/u9fs-ssh/default/env/USER @@ -0,0 +1 @@ +9p diff --git a/u9fs-ssh/default/run b/u9fs-ssh/default/run @@ -0,0 +1,6 @@ +#!/usr/bin/env execlineb +fdmove -c 2 1 + +unixserver -v /tmp/9p +ssh u9fs@host +u9fs -l /dev/stderr -a none -u u9fs /home/u9fs diff --git a/u9fs-ssh/default/type b/u9fs-ssh/default/type @@ -0,0 +1 @@ +longrun diff --git a/venti/default/data/conf b/venti/default/data/conf @@ -0,0 +1,8 @@ +index main + +isect /var/venti/isect0 +isect /var/venti/isect1 +arenas /var/venti/arena0 +mem 10M +bcmem 20M +icmem 30M diff --git a/venti/default/data/fmt b/venti/default/data/fmt @@ -0,0 +1,9 @@ +#!/bin/sh -e + +dd if=/dev/zero of=/home/venti/isect0 bs=1M count=1' +dd if=/dev/zero of=/home/venti/arena0 bs=1M count=1k + +/9/port/bin/venti/fmtisect isect0 /home/venti/isect0 +/9/port/bin/venti/fmtisect isect1 /home/venti/isect1 +/9/port/bin/venti/fmtarenas arena0 /home/venti/arena0 +/9/port/bin/venti/fmtindex conf diff --git a/venti/default/env/PORT_A b/venti/default/env/PORT_A @@ -0,0 +1 @@ +17034 diff --git a/venti/default/env/PORT_H b/venti/default/env/PORT_H @@ -0,0 +1 @@ +8080 diff --git a/venti/default/env/ROOT b/venti/default/env/ROOT @@ -0,0 +1 @@ +/var/venti diff --git a/venti/default/env/USER b/venti/default/env/USER @@ -0,0 +1 @@ +fs diff --git a/venti/default/run b/venti/default/run @@ -0,0 +1,15 @@ +#!/usr/bin/env execlineb +fdmove -c 2 1 +s6-envdir env + +multisubstitute { + importas ROOT ROOT + importas PORT_A PORT_A + importas PORT_H PORT_H +} + +s6-setuidgid venti +venti -s + -c ${ROOT} + -a tcp!*!$PORT_A + -h tcp!*!$PORT_H diff --git a/venti/default/type b/venti/default/type @@ -0,0 +1 @@ +longrun diff --git a/vsftpd/default/conf/allow_anon_ssl b/vsftpd/default/conf/allow_anon_ssl @@ -0,0 +1 @@ +YES diff --git a/vsftpd/default/conf/anon_root b/vsftpd/default/conf/anon_root @@ -0,0 +1 @@ +/var/ftp/anonymous diff --git a/vsftpd/default/conf/anonymous_enable b/vsftpd/default/conf/anonymous_enable @@ -0,0 +1 @@ +YES diff --git a/vsftpd/default/conf/banner_file b/vsftpd/default/conf/banner_file @@ -0,0 +1 @@ +data/banner diff --git a/vsftpd/default/conf/delete_failed_uploads b/vsftpd/default/conf/delete_failed_uploads @@ -0,0 +1 @@ +YES diff --git a/vsftpd/default/conf/dirmessage_enable b/vsftpd/default/conf/dirmessage_enable @@ -0,0 +1 @@ +YES diff --git a/vsftpd/default/conf/ftp_username b/vsftpd/default/conf/ftp_username @@ -0,0 +1 @@ +ftp diff --git a/vsftpd/default/conf/listen b/vsftpd/default/conf/listen @@ -0,0 +1 @@ +YES diff --git a/vsftpd/default/conf/listen_port b/vsftpd/default/conf/listen_port @@ -0,0 +1 @@ +21 diff --git a/vsftpd/default/conf/local_enable b/vsftpd/default/conf/local_enable @@ -0,0 +1 @@ +NO diff --git a/vsftpd/default/conf/mdtm_write b/vsftpd/default/conf/mdtm_write @@ -0,0 +1 @@ +NO diff --git a/vsftpd/default/conf/message_file b/vsftpd/default/conf/message_file @@ -0,0 +1 @@ +index.ftp diff --git a/vsftpd/default/conf/pasv_enable b/vsftpd/default/conf/pasv_enable @@ -0,0 +1 @@ +YES diff --git a/vsftpd/default/conf/pasv_promiscuous b/vsftpd/default/conf/pasv_promiscuous @@ -0,0 +1 @@ +NO diff --git a/vsftpd/default/conf/port_enable b/vsftpd/default/conf/port_enable @@ -0,0 +1 @@ +NO diff --git a/vsftpd/default/conf/secure_chroot_dir b/vsftpd/default/conf/secure_chroot_dir @@ -0,0 +1 @@ +/usr/share/empty diff --git a/vsftpd/default/conf/tcp_wrappers b/vsftpd/default/conf/tcp_wrappers @@ -0,0 +1 @@ +NO diff --git a/vsftpd/default/conf/user_config_dir b/vsftpd/default/conf/user_config_dir @@ -0,0 +1 @@ +data/user diff --git a/vsftpd/default/conf/user_sub_token b/vsftpd/default/conf/user_sub_token @@ -0,0 +1 @@ +/var/ftp diff --git a/vsftpd/default/conf/userlist_deny b/vsftpd/default/conf/userlist_deny @@ -0,0 +1 @@ +NO diff --git a/vsftpd/default/conf/userlist_enable b/vsftpd/default/conf/userlist_enable @@ -0,0 +1 @@ +YES diff --git a/vsftpd/default/conf/userlist_file b/vsftpd/default/conf/userlist_file @@ -0,0 +1 @@ +data/userlist diff --git a/vsftpd/default/conf/vsftpd_log_file b/vsftpd/default/conf/vsftpd_log_file @@ -0,0 +1 @@ +/dev/stderr diff --git a/vsftpd/default/data/banner b/vsftpd/default/data/banner diff --git a/vsftpd/default/env/USER b/vsftpd/default/env/USER @@ -0,0 +1 @@ +ftp diff --git a/vsftpd/default/run b/vsftpd/default/run @@ -0,0 +1,4 @@ +#!/usr/bin/env execlineb +fdmove -c 2 1 + +vsftpd data/conf diff --git a/vsftpd/default/setup b/vsftpd/default/setup @@ -0,0 +1,23 @@ +#!/usr/bin/env execlineb + +if { + forx x { secure_chroot_dir user_sub_token } + importas dir x + + redirfd -r 0 conf/${dir} + withstdinas x + importas -n x x + + mkdir -p ${x} +} + +if { redirfd -w 1 data/userlist ls data/user } + +redirfd -w 1 data/conf +forbacktickx -n x { ls conf } +importas var x + +redirfd -r 0 conf/${var} withstdinas x +importas -n x x + +printf "%s=%s\n" ${var} ${x} diff --git a/vsftpd/default/type b/vsftpd/default/type @@ -0,0 +1 @@ +longrun diff --git a/vsftpd/josuah.net/conf/local_enable b/vsftpd/josuah.net/conf/local_enable @@ -0,0 +1 @@ +YES diff --git a/vsftpd/josuah.net/conf/rsa_cert_file b/vsftpd/josuah.net/conf/rsa_cert_file @@ -0,0 +1 @@ +/etc/ssl/josuah.net/fullchain.pem diff --git a/vsftpd/josuah.net/conf/rsa_private_key_file b/vsftpd/josuah.net/conf/rsa_private_key_file @@ -0,0 +1 @@ +/etc/ssl/josuah.net/privkey.pem diff --git a/vsftpd/josuah.net/data/banner b/vsftpd/josuah.net/data/banner @@ -0,0 +1,3 @@ + josuah.net + ftp + daemon diff --git a/vsftpd/josuah.net/data/user/mark b/vsftpd/josuah.net/data/user/mark diff --git a/vsftpd/tls/conf/allow_anon_ssl b/vsftpd/tls/conf/allow_anon_ssl @@ -0,0 +1 @@ +NO diff --git a/vsftpd/tls/conf/ssl_enable b/vsftpd/tls/conf/ssl_enable @@ -0,0 +1 @@ +YES diff --git a/vtund/client/conf/options/persist b/vtund/client/conf/options/persist @@ -0,0 +1 @@ +no diff --git a/vtund/client/run b/vtund/client/run @@ -0,0 +1,9 @@ +#!/usr/bin/env execlineb +fdmove -c 2 1 + +multisubstitute { + importas HOST HOST + importas SESSION SESSION +} + +vtund -n -f data/conf $SESSION $HOST diff --git a/vtund/default/conf/options/port b/vtund/default/conf/options/port @@ -0,0 +1 @@ +5000 diff --git a/vtund/default/conf/options/type b/vtund/default/conf/options/type @@ -0,0 +1 @@ +stand diff --git a/vtund/default/env/USER b/vtund/default/env/USER @@ -0,0 +1 @@ +vpn diff --git a/vtund/default/print b/vtund/default/print @@ -0,0 +1,17 @@ +#!/usr/bin/env execlineb +elgetpositionals + +backtick x { heredoc 0 $1 sed "s,[^/],,g; s,/,\t,g" } importas -d "\n" -n tab x + +forbacktickx x { ls $1 } importas path x + +ifelse { test -d ${1}/${path} } { + if { printf "%s%s {\n" $tab $path } + if { $0 ${1}/${path} } + ifelse { test . = $1 } { printf "%s}\n" $tab } printf "%s};\n" $tab +} + +ifelse { test -f ${1}/${path} } { + redirfd -r 0 ${1}/${path} withstdinas -n x importas content x + printf "%s%s %s;\n" $tab $path $content +} diff --git a/vtund/default/setup b/vtund/default/setup @@ -0,0 +1,11 @@ +#!/usr/bin/env execlineb + +if { + redirfd -r 0 env/SESSION withstdinas x importas -n session x + redirfd -w 1 conf/${session}/passwd pass vtund/$session +} + +if { mkdir -p data } +redirfd -w 1 data/conf cd conf + +../print . diff --git a/vtund/default/type b/vtund/default/type @@ -0,0 +1 @@ +longrun diff --git a/vtund/h-o.st/conf/kuntur/device b/vtund/h-o.st/conf/kuntur/device @@ -0,0 +1 @@ +tun0 diff --git a/vtund/h-o.st/env/SESSION b/vtund/h-o.st/env/SESSION @@ -0,0 +1 @@ +kunur diff --git a/vtund/kuntur/env/HOST b/vtund/kuntur/env/HOST @@ -0,0 +1 @@ +199.247.28.162 diff --git a/vtund/kuntur/env/SESSION b/vtund/kuntur/env/SESSION @@ -0,0 +1 @@ +kuntur diff --git a/vtund/server/conf/default/compress b/vtund/server/conf/default/compress @@ -0,0 +1 @@ +lzo:3 diff --git a/vtund/server/conf/default/encrypt b/vtund/server/conf/default/encrypt @@ -0,0 +1 @@ +yes diff --git a/vtund/server/conf/default/proto b/vtund/server/conf/default/proto @@ -0,0 +1 @@ +udp diff --git a/vtund/server/conf/default/type b/vtund/server/conf/default/type @@ -0,0 +1 @@ +tun diff --git a/vtund/server/conf/options/bindaddr/addr b/vtund/server/conf/options/bindaddr/addr @@ -0,0 +1 @@ +0.0.0.0 diff --git a/vtund/server/run b/vtund/server/run @@ -0,0 +1,5 @@ +#!/usr/bin/env execlineb +fdmove -c 2 1 + + +vtund -ns -f data/conf diff --git a/walldns/default/env/IP b/walldns/default/env/IP @@ -0,0 +1 @@ +0.0.0.0 diff --git a/walldns/default/env/ROOT b/walldns/default/env/ROOT @@ -0,0 +1 @@ +./data/ diff --git a/walldns/default/env/USER b/walldns/default/env/USER @@ -0,0 +1 @@ +dns diff --git a/walldns/default/run b/walldns/default/run @@ -0,0 +1,5 @@ +#!/usr/bin/env execlineb +fdmove -c 2 1 +s6-envdir env + +walldns diff --git a/walldns/default/type b/walldns/default/type @@ -0,0 +1 @@ +longrun diff --git a/warp-vpn/client/run b/warp-vpn/client/run @@ -0,0 +1,10 @@ +#!/usr/bin/env execlineb +fdmove -c 2 1 + +multisubstitute { + importas HOST HOST + importas PORT PORT + importas DEVTYPE DEVTYPE +} + +warp-vpn -d -h $HOST -t $DEVTYPE diff --git a/warp-vpn/default/env/DEVTYPE b/warp-vpn/default/env/DEVTYPE @@ -0,0 +1 @@ +tun diff --git a/warp-vpn/default/env/PORT b/warp-vpn/default/env/PORT @@ -0,0 +1 @@ +12080 diff --git a/warp-vpn/default/env/USER b/warp-vpn/default/env/USER @@ -0,0 +1 @@ +vpn diff --git a/warp-vpn/default/type b/warp-vpn/default/type @@ -0,0 +1 @@ +longrun diff --git a/warp-vpn/server/env/BIND b/warp-vpn/server/env/BIND @@ -0,0 +1 @@ +0.0.0.0 diff --git a/warp-vpn/server/run b/warp-vpn/server/run @@ -0,0 +1,11 @@ +#!/usr/bin/env execlineb +fdmove -c 2 1 +s6-envdir env + +multisubstitute { + importas BIND BIND + importas PORT PORT + importas DEVTYPE DEVTYPE +} + +warp-vpn -d -b $BIND -t $DEVTYPE