Compare commits

..

2 Commits

Author SHA1 Message Date
Stef Dunlap
0f775e150d 👾 indentation 2025-06-02 12:02:07 -04:00
Stef Dunlap
f60561d470 Fixup for running on Debian on Debian Trixie (13) 2025-06-02 12:00:39 -04:00
2 changed files with 11 additions and 11 deletions

3
our.rb
View File

@ -78,7 +78,6 @@ class User
def loop
while line = s.gets
msg = Message.new line
puts "S: #{msg.raw}"
@hooks.each{|h| h.call(msg)}
end
end
@ -119,7 +118,7 @@ i.hook do |msg|
cmd, args = content.split(' ', 2)
cmd = "#{cmds_dir}/#{cmd}"
args ||= ''
next unless File.exists? cmd
next unless File.exist? cmd
if not File.executable? cmd
i.privmsg target, "#{cmd} isn't executable. try chmod +x"
next

View File

@ -4,12 +4,13 @@ DIR=$(dirname -- $0)
OUR_CMDS_DIR=${OUR_CMDS_DIR:-/town/our}
/usr/bin/bwrap \
--unshare-all \
--ro-bind / / \
--bind "$OUR_CMDS_DIR/data" "$OUR_CMDS_DIR/data" \
--share-net \
--dev /dev \
--tmpfs /tmp \
--unshare-pid \
--die-with-parent \
"$@"
--unshare-all \
--ro-bind / / \
--bind "$OUR_CMDS_DIR/data" "$OUR_CMDS_DIR/data" \
--share-net \
--dev /dev \
--tmpfs /tmp \
--unshare-pid \
--die-with-parent \
--uid 0 --gid 0 \
"$@"