Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save KenwoodFox/45bcb76b27d9ec09923fed4c861bbee0 to your computer and use it in GitHub Desktop.
Save KenwoodFox/45bcb76b27d9ec09923fed4c861bbee0 to your computer and use it in GitHub Desktop.
# pkg info -R bareos.com-database-postgresql-19.2.7
version: "2.7.16_1"
},
readline: {
origin: "devel/readline",
version: "8.0.0"
},
jansson: {
origin: "devel/jansson",
version: "2.12"
},
gettext-runtime: {
origin: "devel/gettext-runtime",
version: "0.20.1"
},
postgresql10-client: {
origin: "databases/postgresql10-client",
version: "10.9"
},
lzo2: {
origin: "archivers/lzo2",
version: "2.10_1"
}
}
categories: [
"sysutils"
]
users: [
"bareos"
]
groups: [
"bareos"
]
shlibs_required: [
"libjansson.so.4",
"libbareosfastlz.so.19",
"libintl.so.8",
"libbareoscats.so.19",
"libbareos.so.19",
"liblzo2.so.2",
"libpq.so.5",
"libbareossql.so.19"
]
annotations: {
FreeBSD_version: "1103000",
repo_type: "binary"
}
files: {
/usr/lib/bareos/scripts/ddl/creates/postgresql.sql: "1$cf98a61ebb6b1c682ca808416947bfd869e9d4a9abf9af255b5754b22cd4cdb9",
/usr/lib/bareos/scripts/ddl/drops/postgresql.sql: "1$f3d7b1bfeee4e95d36496aa247430462e6847b2683a191de42f1106eaa4d4649",
/usr/lib/bareos/scripts/ddl/grants/postgresql-change_owner.dbconfig-template.sql: "1$2a071e72729821f5671450fd37bea1d14cd818f9a44f36bf3f885dd48734b9f3",
/usr/lib/bareos/scripts/ddl/grants/postgresql-readonly.sql: "1$16cfbd2ed25b197dc505c77bbf01a0d136610f5c643f39e0ec0541d8ad46726f",
/usr/lib/bareos/scripts/ddl/grants/postgresql.sql: "1$0d35d0f39990118c1ffffd605f11113fa01a04729fa3fb5b3e8967168a18f86e",
/usr/lib/bareos/scripts/ddl/updates/postgresql.10_11.sql: "1$b43debc69b8bf70a1859672ef00724e1cf8a93f436958495748220bd95251e80",
/usr/lib/bareos/scripts/ddl/updates/postgresql.11_12.sql: "1$c6422670f57c81329aab193fe460ca29462c11a8c31a9f10d6430876e0c71748",
/usr/lib/bareos/scripts/ddl/updates/postgresql.12_14.sql: "1$c28d1d689f4deec4f3a51bc25b40c17e1d4897f98bd47552c7ffafbd0c28da42",
/usr/lib/bareos/scripts/ddl/updates/postgresql.14_2001.sql: "1$e6b69e1cad518fecff653c299fda74a1ea9ecd589d6fb08ab5692f0a2d9da7bf",
/usr/lib/bareos/scripts/ddl/updates/postgresql.2001_2002.sql: "1$c6cf1349925799e18e1318f6c2d05adb10525b483c24276b38c6ef7e94a22aee",
/usr/lib/bareos/scripts/ddl/updates/postgresql.2002_2003.sql: "1$c849fec9ddb821968514ecdd8fe9d3eff4d28e94a01c5a1bc8c70cbeb6fd1477",
/usr/lib/bareos/scripts/ddl/updates/postgresql.2003_2004.sql: "1$6530bc9c9eaf60a0b00544d38dc673cc952756468af6fddc5512fd09c5dec0bf",
/usr/lib/bareos/scripts/ddl/updates/postgresql.2004_2171.sql: "1$b93306dc5cb4dfd0235dec7f731e36ce712a988865765b6cdf7631d063f5964a",
/usr/lib/bareos/scripts/ddl/updates/postgresql.bee.1017_2004.sql: "1$aadc0d067c2f07d1b036d15274c430afe24659900d74e6b0cc89f7bbeeb0ad31",
/usr/local/lib/libbareoscats-postgresql.so: "1$7b14a2b9c2f6bdc046c4e31002b93b03e37a0df95fdcadf1be3124029d924e78"
}
scripts: {
post-install: "/usr/sbin/service ldconfig restart > /dev/null",
post-deinstall: "/usr/sbin/service ldconfig restart > /dev/null",
install: "#!/bin/sh\nset -e\n\nPKGNAME=\"$1\"\nMODE=\"$2\" # PRE-INSTALL, POST-INSTALL, DEINSTALL, POST-DEINSTALL\n\nLOGFILE=/tmp/bareos-setup.log\n\ninitialize_bareos(){\n\t\techo \"$PKGNAME: initializing bareos configuration, logs to ${LOGFILE}\"\n\t\t/usr/lib/bareos/scripts/bareos-config initialize_local_hostname >>${LOGFILE} 2>&1 || echo \"initialize_local_hostname failed\"\n\t\t/usr/lib/bareos/scripts/bareos-config initialize_passwords >>${LOGFILE} 2>&1 || echo \"initialize_passwords failed\"\n\t\t/usr/lib/bareos/scripts/bareos-config initialize_database_driver >>${LOGFILE} 2>&1 || echo \"initialize_database_driver failed\"\n}\n\ncase \"$MODE\" in\nPOST-INSTALL)\n\tcase \"$PKGNAME\" in\n\t\tbareos.com-director*)\n\t\t\tinitialize_bareos\n\t\t\t#echo \"enable the service with 'sysrc bareosdir_enable=YES'\"\n\t\t;;\n\n\t\tbareos.com-filedaemon*)\n\t\t\tinitialize_bareos\n\t\t\t#echo \"enable the service with 'sysrc bareosfd_enable=YES'\"\n\n\t\t;;\n\n\t\tbareos.com-storage*)\n\t\t\tinitialize_bareos\n\t\t\t#echo \"enable the service with 'sysrc bareossd_enable=YES'\"\n\t\t;;\n esac\n\t;;\nDEINSTALL)\n\t;;\nPRE-INSTALL)\n\ttrue\n\t;;\nPOST-DEINSTALL)\n\techo \"deinstalling $PKGNAME\"\n\tcase \"$PKGNAME\" in\n\t\tbareos.com-director*)\n\t\t\techo \"shutting down bareos-dir...\"\n\t\t\tservice bareos-dir status && service bareos-dir stop || echo \" already stopped\"\n\t\t;;\n\n\t\tbareos.com-filedaemon*)\n\t\t\techo \"shutting down bareos-fd...\"\n\t\t\tservice bareos-fd status && service bareos-fd stop || echo \" already stopped\"\n\t\t;;\n\n\t\tbareos.com-storage*)\n\t\t\techo \"shutting down bareos-fd...\"\n\t\t\tservice bareos-sd status && service bareos-sd stop || echo \" already stopped\"\n\t\t;;\n esac\n\t;;\nesac",
deinstall: "#!/bin/sh\nset -e\n\nPKGNAME=\"$1\"\nMODE=\"$2\" # PRE-INSTALL, POST-INSTALL, DEINSTALL, POST-DEINSTALL\n\nLOGFILE=/tmp/bareos-setup.log\n\ninitialize_bareos(){\n\t\techo \"$PKGNAME: initializing bareos configuration, logs to ${LOGFILE}\"\n\t\t/usr/lib/bareos/scripts/bareos-config initialize_local_hostname >>${LOGFILE} 2>&1 || echo \"initialize_local_hostname failed\"\n\t\t/usr/lib/bareos/scripts/bareos-config initialize_passwords >>${LOGFILE} 2>&1 || echo \"initialize_passwords failed\"\n\t\t/usr/lib/bareos/scripts/bareos-config initialize_database_driver >>${LOGFILE} 2>&1 || echo \"initialize_database_driver failed\"\n}\n\ncase \"$MODE\" in\nPOST-INSTALL)\n\tcase \"$PKGNAME\" in\n\t\tbareos.com-director)\n\t\t\tinitialize_bareos\n\t\t\tsysrc bareosdir_enable=YES\n\t\t;;\n\n\t\tbareos.com-filedaemon)\n\t\t\tinitialize_bareos\n\t\t\tsysrc bareosfd_enable=YES\n\n\t\t;;\n\n\t\tbareos.com-storage)\n\t\t\tinitialize_bareos\n\t\t\tsysrc bareossd_enable=YES\n\t\t;;\n esac\n\t;;\nDEINSTALL)\n\t;;\nPRE-INSTALL)\n\ttrue\n\t;;\nPOST-DEINSTALL)\n\techo \"deinstalling $PKGNAME\"\n\tcase \"$PKGNAME\" in\n\t\tbareos.com-director)\n\t\t\techo \"shutting down bareos-dir...\"\n\t\t\tservice bareos-dir status && service bareos-dir stop || echo \" already stopped\"\n\t\t\tsysrc -x bareosdir_enable\n\t\t;;\n\n\t\tbareos.com-filedaemon)\n\t\t\techo \"shutting down bareos-fd...\"\n\t\t\tservice bareos-fd status && service bareos-fd stop || echo \" already stopped\"\n\t\t\tsysrc -x bareosfd_enable\n\n\t\t;;\n\n\t\tbareos.com-storage)\n\t\t\techo \"shutting down bareos-fd...\"\n\t\t\tservice bareos-sd status && service bareos-sd stop || echo \" already stopped\"\n\t\t\tsysrc -x bareossd_enable\n\t\t;;\n esac\n\t;;\nesac"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment