-
-
Notifications
You must be signed in to change notification settings - Fork 129
Expand file tree
/
Copy pathpkg-install.in
More file actions
30 lines (23 loc) · 1.29 KB
/
pkg-install.in
File metadata and controls
30 lines (23 loc) · 1.29 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#!/bin/sh
if [ "${2}" != "POST-INSTALL" ]; then
exit 0
fi
# Warn users installing on 32-bit systems
ARCH_BITS=$(/usr/bin/getconf LONG_BIT)
if [ "${ARCH_BITS}" = "32" ]; then
echo "!!! WARNING: This package is not supported on 32-bit systems. !!!"
fi
# Make this package known to pfSense
/usr/local/bin/php -f /etc/rc.packages %%PORTNAME%% ${2}
# Setup the pfsense-RESTAPI command line tool
/bin/chmod +x /usr/local/pkg/RESTAPI/.resources/scripts/manage.php
/bin/ln -s /usr/local/pkg/RESTAPI/.resources/scripts/manage.php /usr/local/bin/pfsense-restapi
# Build Endpoints, Forms, privs, documentation and restore an existing configuration if present/configured
/usr/local/bin/php -f /usr/local/pkg/RESTAPI/.resources/scripts/manage.php buildendpoints
/usr/local/bin/php -f /usr/local/pkg/RESTAPI/.resources/scripts/manage.php buildforms
/usr/local/bin/php -f /usr/local/pkg/RESTAPI/.resources/scripts/manage.php buildschemas
/usr/local/bin/php -f /usr/local/pkg/RESTAPI/.resources/scripts/manage.php restore
# Setup cron jobs for Dispatchers that run on a schedule
/usr/local/bin/php -f /usr/local/pkg/RESTAPI/.resources/scripts/manage.php scheduledispatchers
# Restart the web GUI in the background to apply nginx changes
/usr/local/bin/php -f /usr/local/pkg/RESTAPI/.resources/scripts/manage.php restartwebgui