Compare commits
4 commits
842d04c63a
...
0148f909d9
Author | SHA1 | Date | |
---|---|---|---|
0148f909d9 | |||
0606e93cde | |||
bf9eb0ef73 | |||
cd14df1f11 |
4 changed files with 47 additions and 4 deletions
43
build
Executable file
43
build
Executable file
|
@ -0,0 +1,43 @@
|
||||||
|
#!/bin/sh -e
|
||||||
|
# install.sh
|
||||||
|
installtarget=/usr/local/bin
|
||||||
|
chatlogdir=/var/log/bunkchat
|
||||||
|
chatlog=chat.log
|
||||||
|
|
||||||
|
if ! [$(id -u) = 0]; then
|
||||||
|
echo "ERROR: please run install with root permission" >&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
chattrfailed() {
|
||||||
|
set +e
|
||||||
|
rm -rf $chatlogdir
|
||||||
|
echo
|
||||||
|
echo "ERROR: could not set append only attribute in ${chatlogdir}"
|
||||||
|
echo " does your filesystem support 'chattr +a' ?"
|
||||||
|
exit 1
|
||||||
|
}
|
||||||
|
|
||||||
|
# do this setup first in case chattr fails
|
||||||
|
# mk chat directory and touch file
|
||||||
|
mkdir $chatlogdir
|
||||||
|
chmod 755 $chatlogdir
|
||||||
|
|
||||||
|
touch ${chatlogdir}/${chatlog}
|
||||||
|
chmod 666 ${chatlogdir}/${chatlog}
|
||||||
|
# if chattr +a not supported on this file system catch error and clean up
|
||||||
|
chattr +a ${chatlogdir}/${chatlog} || chattrfailed
|
||||||
|
|
||||||
|
cp proclaim heed scry $installtarget
|
||||||
|
|
||||||
|
chmod 755 ${installtarget}/proclaim
|
||||||
|
chmod 755 ${installtarget}/heed
|
||||||
|
chmod 755 ${installtarget}/scry
|
||||||
|
|
||||||
|
chown root:root ${installtarget}/proclaim
|
||||||
|
chown root:root ${installtarget}/heed
|
||||||
|
chown root:root ${installtarget}/scry
|
||||||
|
|
||||||
|
|
||||||
|
echo "SUCCESS! bunkchat installed!"
|
||||||
|
exit 0
|
2
heed
2
heed
|
@ -1,6 +1,6 @@
|
||||||
#!/bin/sh -e
|
#!/bin/sh -e
|
||||||
|
|
||||||
chatlog="/var/log/bunkchat/chat.log"
|
chatlog=var/log/bunkchat/chat.log
|
||||||
|
|
||||||
clear
|
clear
|
||||||
|
|
||||||
|
|
4
proclaim
4
proclaim
|
@ -2,8 +2,8 @@
|
||||||
|
|
||||||
# make username uppercase
|
# make username uppercase
|
||||||
username=$(echo "$USER" | tr '[:lower:]' '[:upper:]')
|
username=$(echo "$USER" | tr '[:lower:]' '[:upper:]')
|
||||||
timezone="UTC"
|
timezone=UTC
|
||||||
chatlog="/var/log/bunkchat/chat.log"
|
chatlog=/var/log/bunkchat/chat.log
|
||||||
prompt=""
|
prompt=""
|
||||||
|
|
||||||
makeSlug () {
|
makeSlug () {
|
||||||
|
|
2
scry
2
scry
|
@ -1,4 +1,4 @@
|
||||||
#!/bin/sh -e
|
#!/bin/sh -e
|
||||||
chatlog="/var/log/bunkchat/chat.log"
|
chatlog=/var/log/bunkchat/chat.log
|
||||||
|
|
||||||
less $chatlog
|
less $chatlog
|
||||||
|
|
Loading…
Reference in a new issue