./nginx.conf

#user  nobody;
worker_processes auto; # Try to autodetect it

#error_log logs/error.log;
#error_log logs/error.log notice;
#error_log logs/error.log info;

#pid logs/nginx.pid;

events {
    worker_connections 1024;
    use epoll; # Efficient on Linux 2.6+
}

http {
    include mime.types;
    default_type application/octet-stream;

    #log_format main '$remote_addr - $remote_user [$time_local] "$request" '
    #                '$status $body_bytes_sent "$http_referer" '
    #                '"$http_user_agent" "$http_x_forwarded_for"';

    #access_log logs/access.log main;

    server_tokens off; # Disable nginx version
    sendfile on;
    tcp_nopush on;
    tcp_nodelay on;
    keepalive_timeout 65;
    types_hash_max_size 2048;

    gzip on;
    gzip_disable "msie6";

    gzip_vary on;
    gzip_proxied any;
    gzip_comp_level 6;
    gzip_buffers 16 8k;
    gzip_http_version 1.1;
    gzip_types text/plain text/css application/json application/javascript text/xml application/xml application/xml+rss text/javascript;

    ssl_protocols TLSv1 TLSv1.1 TLSv1.2 TLSv1.3; # Dropping SSLv3, ref: POODLE
    ssl_prefer_server_ciphers on;

    include conf.d/*.conf;
    include sites-enabled/*;
}
# vim: set ts=4 sw=4 sts=4 et:

./sites-available/backupd.conf

upstream backupd_backend {
    server 127.0.0.1:50305;
    keepalive 32;
}

server {
    listen 80 default_server;
    listen [::]:80 default_server;

    include common_params;
    include backupd_params;

    location = / {
        proxy_pass http://backupd_backend;
    }

    location /d2 {
        include proxy_params;
        include proxy_timeout_params;
        include proxy_bufferless_params;
        proxy_pass http://backupd_backend;
    }
}
# vim: set ts=4 sw=4 sts=4 et:

./sites-available/backupd-ssl.conf

upstream backupds_backend {
    server 127.0.0.1:50305;
    keepalive 32;
}

server {
    listen 443 ssl;
    listen [::]:443 ssl;

    include common_params;
    include backupd_params;
    include ssl_params;

    proxy_cookie_path / "/; Secure";

    location = / {
        proxy_pass http://backupds_backend;
    }

    location /d2 {
        include proxy_params;
        include proxy_timeout_params;
        include proxy_bufferless_params;
        proxy_pass http://backupds_backend;
    }
}
# vim: set ts=4 sw=4 sts=4 et:

./sites-available/storaged-ssl.conf

upstream storageds_backend {
    server 127.0.0.1:50306;
    keepalive 32;
}

server {
    listen 60306 ssl;
    listen [::]:60306 ssl;

    include common_params;
    include ssl_params;

    location / {
        include proxy_params;
        include storaged_proxy_timeout_params;
        include proxy_bufferless_params;
        proxy_pass http://storageds_backend;
    }
}
# vim: set ts=4 sw=4 sts=4 et:

./backupd/svc.conf.d/00-base.conf

# dbackup3-backupd svc.conf

dynamic LOGGER Service_Object* log:_make_ACE_Logging_Strategy_Ex()
        "-n $LOGGING_NAME -f $LOGGING_FLAGS -p $LOGGING_PRIORITY -s $LOGFILE -i 3600 -m 4096 -N 30 -o -z"

dynamic STDERR Service_Object* redirstderr:_make_Stderr_Redirect_Service()
        "dummy -s $STDERR_LOGFILE"

dynamic SCRT Service_Object* scrt:_make_SCRT_Service()
        "dummy"

dynamic SSLINITEX Service_Object* sslinitex:_make_ACE_SSL_Initializer_Ex()
        "dummy --no-renegotiation --version-list sslv2,sslv3,tlsv1.1,tlsv1.2,tlsv1.3 --server-cipher-order -c /etc/opt/scutech/dbackup3/backupd/ssl/server.crt -k /etc/opt/scutech/dbackup3/backupd/ssl/server.key"

dynamic GLOBALCONF Service_Object* globalconf:_make_Global_Config_Service()
        "dummy -f /etc/opt/scutech/dbackup3/backupd/global.ini"

dynamic PROCMGR Service_Object* procmgr:_make_Process_Manager_Service()
        "dummy"

dynamic TASKMGR Service_Object* taskmgr:_make_Task_Manager_Service()
        "dummy"

dynamic LOCAL_KEY Service_Object* modkey:_make_Local_Key_Service()
        "dummy -s /etc/opt/scutech/dbackup3/backupd/key.d -t sqlite"

dynamic DATABASE Service_Object* database:_make_Database_Service()
        "dummy -c /etc/opt/scutech/dbackup3/backupd/database-connector.d -m /etc/opt/scutech/dbackup3/backupd/database-metadata.d -d /etc/opt/scutech/dbackup3/backupd/database.d --manual-open-db"

dynamic KEY Service_Object* modkey:_make_Key_Service()
        "dummy -s /etc/opt/scutech/dbackup3/backupd/key.d -t database"

dynamic SESSION Service_Object* modsess:_make_Session_Service()
        "dummy -s /etc/opt/scutech/dbackup3/backupd/session.d -t ${SESSION_BACKEND:=database} --single-user-mode ${SESSION_SINGLE_USER_MODE:=none} --set-cookie-additional-attributes ${SESSION_SET_COOKIE_ADDITIONAL_ATTRIBUTES:="HttpOnly; SameSite=Strict"}"

dynamic AUTH Service_Object* modauth:_make_Auth_Service()
        "dummy -d /etc/opt/scutech/dbackup3/backupd/auth-handler.d"

dynamic BACKUPD Service_Object* backupd:_make_Backupd_Service()
        "dummy --agent-report-metadata=$REPORT_METADATA --approval-conf-path /etc/opt/scutech/dbackup3/backupd/approval.d --item-conf-path /etc/opt/scutech/dbackup3/backupd/item.d --health-check-interval ${BACKUPD_HEALTH_CHECK_INTERVAL:=60} --channel-health-timeout ${BACKUPD_CHANNEL_HEALTH_TIMEOUT:=600} --channel-registration-delay-slot-time ${BACKUPD_CHANNEL_REGISTRATION_DELAY_SLOT_TIME:=5} --channel-registration-minimal-timeout ${BACKUPD_CHANNEL_REGISTRATION_MINIMAL_TIMEOUT:=60} --job-dispatch-timeout ${BACKUPD_JOB_DISPATCH_TIMEOUT:=45} -i ${BACKUPD_SECURITY_CHECK_INTERVAL:=1440} --default-auth ${BACKUPD_DEFAULT_AUTH:=local} --instance-status-timeout ${BACKUPD_INSTANCE_STATUS_TIMEOUT:=300} --platform ${BACKUPD_PLATFORM:=default} --setting-conf-path /etc/opt/scutech/dbackup3/backupd/setting.d --setting-backend ${BACKUPD_SETTING_BACKEND:=database} --setting-security-no-action-timeout-min ${BACKUPD_SETTING_SECURITY_NO_ACTION_TIMEOUT_MIN:=0} --storaged-stat-expiry ${BACKUPD_STORAGED_STAT_EXPIRY:=3600} --resource-stat-interval ${BACKUPD_RESOURCE_STAT_INTERVAL:=1440} --agent-frozen-seconds ${BACKUPD_AGENT_FROZEN_SECONDS:=60} --overview-cache-expiry ${BACKUPD_OVERVIEW_CACHE_EXPIRY:=600}"

dynamic REPORT Service_Object* breport:_make_Report_Manager_Service()
        "dummy"

dynamic TGTCONF Service_Object* tgtconf:_make_Target_Config_Manager_Service()
        "dummy"

dynamic FILE_CATALOG Service_Object* filecat:_make_File_Catalog_Service()
        "dummy -t sqlite -p $BACKUPD_PORT"

dynamic MEDIA_POOL_MANAGER Service_Object* mpoolmgr:_make_Media_Pool_Manager_Service()
        "dummy -t sqlite -d 30"

dynamic CAT Service_Object* cat:_make_Catalog_Service()
        "dummy -t sqlite"

dynamic CATALOG Service_Object* catb:_make_Catalog_Manager_Service()
        "dummy"

dynamic NOTIFY Service_Object* notify:_make_Notify_Service()
        "dummy -n /etc/opt/scutech/dbackup3/backupd/notify.d"

dynamic EVENT Service_Object* event:_make_Event_Service()
        "dummy -h /etc/opt/scutech/dbackup3/backupd/event.d"

dynamic LINUX_BMR_SNAR Service_Object* bmrsnar:_make_Linux_BMR_Snar_Service()
        "dummy"

dynamic MTF_NFS_MANAGER Service_Object* mtfnfsmgr:_make_MTF_NFS_Manager_Service()
        "dummy"

dynamic NDMP_MGR Service_Object* ndmpmgr:_make_NDMP_Manager_Service()
        "dummy"

dynamic HADOOP_CLUSTER Service_Object* hadoopcltmgr:_make_Hadoop_Cluster_Service()
        "dummy"

dynamic MYSQL_CLUSTER_MANAGER Service_Object* mysqlcluster:_make_MySQL_Cluster_Manager_Service()
        "dummy"

dynamic OSCAR_CLUSTER_MANAGER Service_Object* oscarcluster:_make_Oscar_Cluster_Manager_Service()
        "dummy"

dynamic DMDB_CLUSTER_MANAGER Service_Object* dmdbcluster:_make_DMDB_Cluster_Manager_Service()
        "dummy"

dynamic OBS_MANAGER Service_Object* obsd:_make_OBS_Manager_Service()
        "dummy"

dynamic BACKINT_CATALOG Service_Object* backintc:_make_Backint_Catalog_Manager_Service()
        "dummy"

dynamic BACKUP_SET_MGR Service_Object* bsetmgr:_make_Backup_Set_Manager_Service()
        "dummy -t 1 "

dynamic QUEUE Service_Object* modqueue:_make_Queue_Service()
        "dummy -c /etc/opt/scutech/dbackup3/backupd/queue-creator.d -h /etc/opt/scutech/dbackup3/backupd/queue-handler.d -q /etc/opt/scutech/dbackup3/backupd/queue.d -t 2 -w 5"

dynamic JSONRPC Service_Object* json_rpc:_make_JSON_RPC_Service()
        "dummy -j /etc/opt/scutech/dbackup3/backupd/jsonrpc.d -f /etc/opt/scutech/dbackup3/backupd/jsonrpc-params.d -r /etc/opt/scutech/dbackup3/backupd/restful.d"

dynamic HTTPD Service_Object* httpd:_make_HTTP_Service()
        "dummy -p $BACKUPD_PORT -f /etc/opt/scutech/dbackup3/backupd/http.d -a /etc/opt/scutech/dbackup3/backupd/http-auth.d -w /etc/opt/scutech/dbackup3/backupd/websocket.d -l $ACCESS_LOGFILE -m 4096 -N 30 -z -i 60 --ping-interval 30 --ping-timeout 15 --listen-backlog $LISTEN_BACKLOG --accept-timeout 10 --socket-receive-timeout 300 --socket-send-timeout 60 --read-ahead --read-discard-cache=32m"

dynamic WEBSOCKET Service_Object* websocketc:_make_WebSocket_Service()
        "dummy -h $SUPERIOR_BACKUPD_HOST -p $SUPERIOR_BACKUPD_PORT $SUPERIOR_BACKUPD_SSL_OPT -f /etc/opt/scutech/dbackup3/backupd/websocket-event.d --ping-interval 60 --ping-timeout 30 -u /d2/c -i6"

dynamic STORAGE_CATALOG Service_Object* storage_catalog:_make_Storage_Catalog_Service()
        "dummy"

dynamic RECYCLING Service_Object* recycling:_make_Recycling_Service()
        "dummy -i 1440 -t 90"

dynamic POOL_REPLICATE Service_Object* poolrepl:_make_Pool_Replicate_Service()
        "dummy -c ${COMMON_REPLICATE_THREADS:=2} -i ${REPLICATE_NOTIFY_INTERVAL:=30} --max-retries ${REPLICATE_JOB_RETRIES:=6} --min-retry-interval ${MIN_REPLICATE_RETRY_INTERVAL:=600} --max-retry-interval ${MAX_REPLICATE_RETRY_INTERVAL:=3600}"

dynamic BACKUP_SET_REPL_MGR Service_Object* bsetmgr:_make_Replicate_Manager_Service()
        "dummy --max-rule-targets 3"
#  vim: set ts=4 sw=4 sts=4 noet:

./storaged/svc.conf.d/00-base.conf

# dbackup3-storaged svc.conf

dynamic LOGGER Service_Object* log:_make_ACE_Logging_Strategy_Ex()
        "-n $LOGGING_NAME -f $LOGGING_FLAGS -p $LOGGING_PRIORITY -s $LOGFILE -i 3600 -m 4096 -N 30 -o -z"

dynamic STDERR Service_Object* redirstderr:_make_Stderr_Redirect_Service()
        "dummy -s $STDERR_LOGFILE"

dynamic SCRT Service_Object* scrt:_make_SCRT_Service()
        "dummy"

dynamic SSLINITEX Service_Object* sslinitex:_make_ACE_SSL_Initializer_Ex()
        "dummy --no-renegotiation --version-list sslv2,sslv3,tlsv1.1,tlsv1.2,tlsv1.3 --server-cipher-order -c /etc/opt/scutech/dbackup3/storaged/ssl/server.crt -k /etc/opt/scutech/dbackup3/storaged/ssl/server.key"

dynamic PROCMGR Service_Object* procmgr:_make_Process_Manager_Service()
        "dummy"

dynamic TASKMGR Service_Object* taskmgr:_make_Task_Manager_Service()
        "dummy"

dynamic LOCAL_KEY Service_Object* modkey:_make_Local_Key_Service()
        "dummy -s /etc/opt/scutech/dbackup3/storaged/key.d -t sqlite"

dynamic DATABASE Service_Object* database:_make_Database_Service()
        "dummy -c /etc/opt/scutech/dbackup3/storaged/database-connector.d -m /etc/opt/scutech/dbackup3/storaged/database-metadata.d -d /etc/opt/scutech/dbackup3/storaged/database.d --manual-open-db"

dynamic SESSION Service_Object* modsess:_make_Session_Service()
        "dummy --single-user-mode ${SESSION_SINGLE_USER_MODE:=none} --set-cookie-additional-attributes ${SESSION_SET_COOKIE_ADDITIONAL_ATTRIBUTES:="HttpOnly; SameSite=Strict"}"

dynamic AUTH Service_Object* modauth:_make_Auth_Service()
        "dummy -d /etc/opt/scutech/dbackup3/storaged/auth-handler.d"

dynamic STORAGED Service_Object* storaged:_make_Storaged_Service()
        "dummy --channel-registration-delay-slot-time ${STORAGED_CHANNEL_REGISTRATION_DELAY_SLOT_TIME:=5} --channel-registration-minimal-timeout ${STORAGED_CHANNEL_REGISTRATION_MINIMAL_TIMEOUT:=60} --setting-conf-path /etc/opt/scutech/dbackup3/storaged/setting.d --setting-backend ${STORAGED_SETTING_BACKEND:=database}"

dynamic DEVMGR Service_Object* devmgr:_make_Device_Manager_Service()
        "dummy"

dynamic SCSI_POOL_MANAGER Service_Object* scsipool:_make_SCSI_Pool_Manager_Service()
        "dummy -f zfs"

dynamic QUEUE Service_Object* modqueue:_make_Queue_Service()
        "dummy -c /etc/opt/scutech/dbackup3/storaged/queue-creator.d -h /etc/opt/scutech/dbackup3/storaged/queue-handler.d -q /etc/opt/scutech/dbackup3/storaged/queue.d -t 2 -w 5"

dynamic JSONRPC Service_Object* json_rpc:_make_JSON_RPC_Service()
        "dummy -j /etc/opt/scutech/dbackup3/storaged/jsonrpc.d -f /etc/opt/scutech/dbackup3/storaged/jsonrpc-params.d -r /etc/opt/scutech/dbackup3/storaged/restful.d"

dynamic HTTPD Service_Object* httpd:_make_HTTP_Service()
        "dummy -p $STORAGED_PORT -f /etc/opt/scutech/dbackup3/storaged/http.d -a /etc/opt/scutech/dbackup3/storaged/http-auth.d -w /etc/opt/scutech/dbackup3/storaged/websocket.d -l $ACCESS_LOGFILE -m 4096 -N 30 -z --listen-backlog $LISTEN_BACKLOG --accept-timeout 10 --read-ahead --read-discard-cache=33554432"

dynamic MTF_SYNTHESIZER_MANAGER Service_Object* mtf_synthesizer:_make_MTF_Synthesizer_Service()
        "dummy -s 10737418240 -p 5 -n 7"

dynamic WEBSOCKET Service_Object* websocketc:_make_WebSocket_Service()
        "dummy -h $BACKUPD_HOST -p $BACKUPD_PORT $BACKUPD_SSL_OPT -f /etc/opt/scutech/dbackup3/storaged/websocket-event.d --ping-interval 60 --ping-timeout 30 -u /d2/c -i6"

dynamic STORAGE_CATALOG Service_Object* storage_catalog:_make_Storage_Catalog_Service()
        "dummy -h $BACKUPD_HOST -p $BACKUPD_PORT $BACKUPD_SSL_OPT"

dynamic POOL_REPLICATE Service_Object* poolrepl:_make_Pool_Replicate_Service()
        "dummy -c ${COMMON_REPLICATE_THREADS:=2} -t ${TAPE_REPLICATE_THREADS:=2} -m ${MAX_TAPE_DRIVE_PER_REPLICATE:=1} -i ${REPLICATE_NOTIFY_INTERVAL:=30} --max-retries ${REPLICATE_JOB_RETRIES:=6} --min-retry-interval ${MIN_REPLICATE_RETRY_INTERVAL:=600} --max-retry-interval ${MAX_REPLICATE_RETRY_INTERVAL:=3600}"

dynamic MEDIA_POOL Service_Object* mpool:_make_Media_Pool_Service()
        "dummy -t sqlite -h $BACKUPD_HOST -p $BACKUPD_PORT $BACKUPD_SSL_OPT -e 864000 -i 60"

dynamic RECYCLING Service_Object* recycling:_make_Recycling_Service()
        "dummy -i 1440 -t 90"

dynamic MERGE_BACKUP Service_Object* mergebackup:_make_Merge_Backup_Service()
        "dummy -h $BACKUPD_HOST -p $BACKUPD_PORT $BACKUPD_SSL_OPT"

dynamic NFS_MANAGER Service_Object* nfsmgr:_make_NFS_Manager_Service()
        "dummy -c 30 -i 300 -m 4096 -n 10 -z -a /etc/opt/scutech/dbackup3/storaged/nfs.d -- /opt/scutech/dbackup3/bin/nfsd -N WARN -f /var/opt/scutech/dbackup3/storaged/nfsd.conf -L /var/log/dbackup3/nfsd.log -p /var/run/dbackup3-nfsd.pid -F"

./storaged/svc.conf.d/10-hraid-monitor.conf

dynamic AACRAID_MONITOR Service_Object * hraidmonitor:_make_HRAID_Monitor_Service ()
        "dummy -h $BACKUPD_HOST -p $BACKUPD_PORT $BACKUPD_SSL_OPT -i 600 -t 30 -l 5"

./agent/svc.conf.d/00-base.conf

# dbackup3-agent svc.conf

dynamic LOGGER Service_Object* log:_make_ACE_Logging_Strategy_Ex()
        "-n $LOGGING_NAME -f $LOGGING_FLAGS -p $LOGGING_PRIORITY -s $LOGFILE -i 3600 -m 4096 -N 30 -o -z"

dynamic SCRT Service_Object* scrt:_make_SCRT_Service()
        "dummy"

dynamic STDERR Service_Object* redirstderr:_make_Stderr_Redirect_Service()
        "dummy -s $STDERR_LOGFILE"

dynamic SSLINITEX Service_Object* sslinitex:_make_ACE_SSL_Initializer_Ex()
        "dummy --no-renegotiation --version-list sslv2,sslv3,tlsv1.1,tlsv1.2,tlsv1.3 --server-cipher-order -c /etc/opt/scutech/dbackup3/agent/ssl/server.crt -k /etc/opt/scutech/dbackup3/agent/ssl/server.key"

dynamic PROCMGR Service_Object* procmgr:_make_Process_Manager_Service()
        "dummy"

dynamic TASKMGR Service_Object* taskmgr:_make_Task_Manager_Service()
        "dummy"

dynamic DEVMGR Service_Object* devmgr:_make_Device_Manager_Service()
        "dummy"

dynamic LOCAL_KEY Service_Object* modkey:_make_Local_Key_Service()
        "dummy -s /etc/opt/scutech/dbackup3/agent/key.d -t sqlite"

dynamic DATABASE Service_Object* database:_make_Database_Service()
        "dummy -c /etc/opt/scutech/dbackup3/agent/database-connector.d -m /etc/opt/scutech/dbackup3/agent/database-metadata.d -d /etc/opt/scutech/dbackup3/agent/database.d --manual-open-db"

dynamic AGENT Service_Object* agent:_make_Agent_Service()
        "dummy --channel-registration-delay-slot-time ${AGENT_CHANNEL_REGISTRATION_DELAY_SLOT_TIME:=5} --channel-registration-minimal-timeout ${AGENT_CHANNEL_REGISTRATION_MINIMAL_TIMEOUT:=60} --instance-conf-path /etc/opt/scutech/dbackup3/agent/instance.d --instance-probe-interval ${AGENT_INSTANCE_PROBE_INTERVAL:=3600}"

dynamic JOBMGR Service_Object* job:_make_Job_Manager_Service()
        "dummy -h $BACKUPD_HOST -p $BACKUPD_PORT $BACKUPD_SSL_OPT -f /etc/opt/scutech/dbackup3/agent/job.d -o /etc/opt/scutech/dbackup3/agent/job-options.d"

dynamic QUEUE Service_Object* modqueue:_make_Queue_Service()
        "dummy -c /etc/opt/scutech/dbackup3/agent/queue-creator.d -h /etc/opt/scutech/dbackup3/agent/queue-handler.d -q /etc/opt/scutech/dbackup3/agent/queue.d -t 1 -w 5"

dynamic JSONRPC Service_Object* json_rpc:_make_JSON_RPC_Service()
        "dummy -j /etc/opt/scutech/dbackup3/agent/jsonrpc.d -f /etc/opt/scutech/dbackup3/agent/jsonrpc-params.d -r /etc/opt/scutech/dbackup3/agent/restful.d"

dynamic HTTPD Service_Object* httpd:_make_HTTP_Service()
        "dummy -p $AGENT_PORT -f /etc/opt/scutech/dbackup3/agent/http.d -w /etc/opt/scutech/dbackup3/agent/websocket.d -l $ACCESS_LOGFILE -m 4096 -N 30 -z --ping-interval 30 --ping-timeout 15 --listen-backlog $LISTEN_BACKLOG --accept-timeout 3 --read-ahead --read-discard-cache=33554432"

dynamic STANDBYMGR Service_Object* standby:_make_Standby_Manager_Service()
        "dummy -f /etc/opt/scutech/dbackup3/agent/standby.d"

dynamic WEBSOCKET Service_Object* websocketc:_make_WebSocket_Service()
        "dummy -h $BACKUPD_HOST -p $BACKUPD_PORT $BACKUPD_SSL_OPT -a $BACKUPD_ACCESS_KEY -f /etc/opt/scutech/dbackup3/agent/websocket-event.d --ping-interval 60 --ping-timeout 30 -u /d2/c -i6"

dynamic STORAGE_CATALOG Service_Object* storage_catalog:_make_Storage_Catalog_Service()
        "dummy -h $BACKUPD_HOST -p $BACKUPD_PORT $BACKUPD_SSL_OPT"

dynamic RECYCLING Service_Object* recycling:_make_Recycling_Service()
        "dummy -i 1440 -t 90"

./agent/svc.conf.d/30-ndmp.conf

dynamic NDMP_TAMGR Service_Object * ndmpa:_make_Tape_Agent_Manager_Service ()
        "dummy -c 30 -i 300 -n /opt/scutech/dbackup3/bin/ndmpd -f /var/opt/scutech/dbackup3/agent/ndmpd.conf -p /var/run/dbackup3-ndmpd.pid"

./agent/svc.conf.d/00-base.conf