View | Details | Raw Unified | Return to bug 274993
Collapse All | Expand All

(-)sysutils/bastille/Makefile (-7 / +15 lines)
Lines 1-5 Link Here
1
PORTNAME=	bastille
1
PORTNAME=	bastille
2
DISTVERSION=	0.10.20231013
2
DISTVERSION=	0.10.20231125
3
CATEGORIES=	sysutils
3
CATEGORIES=	sysutils
4
4
5
MAINTAINER=	christer.edwards@gmail.com
5
MAINTAINER=	christer.edwards@gmail.com
Lines 15-31 GH_ACCOUNT= bastillebsd Link Here
15
NO_BUILD=	yes
15
NO_BUILD=	yes
16
NO_ARCH=	yes
16
NO_ARCH=	yes
17
17
18
USE_RC_SUBR=	bastille
18
post-patch:
19
	@${REINPLACE_CMD} \
20
		-e 's|/usr/local/etc/bastille|${ETCDIR}|g' \
21
		-e 's|/usr/local|${PREFIX}|g' \
22
		${WRKSRC}/usr/local/etc/rc.d/bastille
19
23
20
do-install:
24
do-install:
21
	${INSTALL_SCRIPT} ${WRKSRC}/${PREFIX}/bin/bastille ${STAGEDIR}${PREFIX}/bin
25
	${INSTALL_SCRIPT} ${WRKSRC}/usr/local/bin/bastille ${STAGEDIR}${PREFIX}/bin
26
	${INSTALL_SCRIPT} ${WRKSRC}/usr/local/etc/rc.d/bastille \
27
		${STAGEDIR}${PREFIX}/etc/rc.d
22
28
23
post-install:
29
post-install:
24
	${MKDIR} ${STAGEDIR}${ETCDIR}
30
	${MKDIR} ${STAGEDIR}${ETCDIR}
25
	${MKDIR} ${STAGEDIR}${DATADIR}
31
	${MKDIR} ${STAGEDIR}${DATADIR}
26
	(cd ${WRKSRC}/${DATADIR} && ${COPYTREE_SHARE} . ${STAGEDIR}${DATADIR})
32
	(cd ${WRKSRC}/usr/local/share/bastille && \
27
	${INSTALL_MAN} ${WRKSRC}/${PREFIX}/man/man8/bastille.8.gz \
33
		${COPYTREE_SHARE} . ${STAGEDIR}${DATADIR})
28
		${STAGEDIR}${PREFIX}/man/man8/bastille.8.gz
34
	${INSTALL_MAN} ${WRKSRC}/usr/local/man/man8/bastille.8.gz \
29
	${INSTALL_DATA} ${WRKSRC}/${ETCDIR}/bastille.conf.sample ${STAGEDIR}${ETCDIR}/bastille.conf.sample
35
		${STAGEDIR}${PREFIX}/man/man8/${PORTNAME}.8.gz
36
	${INSTALL_DATA} ${WRKSRC}/usr/local/etc/bastille/bastille.conf.sample \
37
		${STAGEDIR}${ETCDIR}/${PORTNAME}.conf.sample
30
38
31
.include <bsd.port.mk>
39
.include <bsd.port.mk>
(-)sysutils/bastille/distinfo (-3 / +3 lines)
Lines 1-3 Link Here
1
TIMESTAMP = 1697592468
1
TIMESTAMP = 1701531665
2
SHA256 (bastillebsd-bastille-0.10.20231013_GH0.tar.gz) = 46b431dccbf36363b9f396f5ea32fb6899c8b210973c6683acef401cd25414df
2
SHA256 (bastillebsd-bastille-0.10.20231125_GH0.tar.gz) = 10ff52d33278d15af573173a3985381edb020add99c44d14942c3288f65c36e8
3
SIZE (bastillebsd-bastille-0.10.20231013_GH0.tar.gz) = 622679
3
SIZE (bastillebsd-bastille-0.10.20231125_GH0.tar.gz) = 625906
(-)sysutils/bastille/files/bastille.in (-61 lines)
Removed Link Here
1
#!/bin/sh
2
3
# Bastille jail startup script
4
5
# PROVIDE: bastille
6
# REQUIRE: LOGIN
7
# KEYWORD: shutdown
8
9
# Add the following to /etc/rc.conf[.local] to enable this service
10
#
11
# bastille_enable (bool):          Set to NO by default.
12
#               Set it to YES to enable bastille.
13
# bastille_list (string):        Set to "ALL" by default.
14
#               Space separated list of jails to start.
15
#
16
17
. /etc/rc.subr
18
19
name=bastille
20
rcvar=${name}_enable
21
22
: ${bastille_enable:=NO}
23
: ${bastille_list:="ALL"}
24
25
command=%%PREFIX%%/bin/${name}
26
start_cmd="bastille_start"
27
stop_cmd="bastille_stop"
28
restart_cmd="bastille_stop && bastille_start"
29
30
bastille_start()
31
{
32
    if [ ! -n "${bastille_list}" ]; then
33
        echo "${bastille_list} is undefined"
34
        return 1
35
    fi
36
37
    local _jail
38
39
    for _jail in ${bastille_list}; do
40
        echo "Starting Bastille Jail: ${_jail}"
41
        ${command} start ${_jail}
42
    done
43
}
44
45
bastille_stop()
46
{
47
    if [ ! -n "${bastille_list}" ]; then
48
        echo "${bastille_list} is undefined"
49
        return 1
50
    fi
51
52
    local _jail
53
54
    for _jail in ${bastille_list}; do
55
        echo "Stopping Bastille Jail: ${_jail}"
56
        ${command} stop ${_jail}
57
    done
58
}
59
60
load_rc_config ${name}
61
run_rc_command "$1"
(-)sysutils/bastille/pkg-plist (+2 lines)
Lines 1-5 Link Here
1
@sample %%ETCDIR%%/bastille.conf.sample
1
@sample %%ETCDIR%%/bastille.conf.sample
2
bin/bastille
2
bin/bastille
3
etc/rc.d/bastille
3
%%DATADIR%%/bootstrap.sh
4
%%DATADIR%%/bootstrap.sh
4
%%DATADIR%%/clone.sh
5
%%DATADIR%%/clone.sh
5
%%DATADIR%%/cmd.sh
6
%%DATADIR%%/cmd.sh
Lines 19-24 bin/bastille Link Here
19
%%DATADIR%%/list.sh
20
%%DATADIR%%/list.sh
20
%%DATADIR%%/mount.sh
21
%%DATADIR%%/mount.sh
21
%%DATADIR%%/pkg.sh
22
%%DATADIR%%/pkg.sh
23
%%DATADIR%%/rcp.sh
22
%%DATADIR%%/rdr.sh
24
%%DATADIR%%/rdr.sh
23
%%DATADIR%%/rename.sh
25
%%DATADIR%%/rename.sh
24
%%DATADIR%%/restart.sh
26
%%DATADIR%%/restart.sh

Return to bug 274993