2022-09-17 09:53:52 -04:00
|
|
|
#!/bin/sh
|
2023-07-31 11:16:07 -04:00
|
|
|
if [ -f "/opt/mow/uninst" ]; then
|
|
|
|
mow -u -f
|
|
|
|
fi
|
|
|
|
|
2023-12-23 17:38:11 -05:00
|
|
|
if [ ! -d "/opt" ]; then
|
|
|
|
mkdir /opt
|
|
|
|
fi
|
|
|
|
|
2022-12-18 10:25:46 -05:00
|
|
|
if [ ! -d "/opt/mow" ]; then
|
|
|
|
mkdir /opt/mow
|
|
|
|
fi
|
2023-07-31 11:16:07 -04:00
|
|
|
|
2023-10-19 15:04:39 -04:00
|
|
|
if [ ! -d "/var/footage" ]; then
|
|
|
|
mkdir /var/footage
|
2023-07-31 11:16:07 -04:00
|
|
|
fi
|
|
|
|
|
|
|
|
if [ ! -d "/etc/mow" ]; then
|
|
|
|
mkdir /etc/mow
|
|
|
|
fi
|
|
|
|
|
2023-10-19 15:04:39 -04:00
|
|
|
if [ ! -d "/var/buffer" ]; then
|
|
|
|
mkdir /var/buffer
|
2023-07-31 11:16:07 -04:00
|
|
|
fi
|
|
|
|
|
|
|
|
cp -v ./.build-mow/mow /opt/mow/bin
|
|
|
|
|
|
|
|
echo "writing /opt/mow/run"
|
2022-12-18 10:25:46 -05:00
|
|
|
printf "#!/bin/sh\n" > /opt/mow/run
|
2023-02-18 21:20:24 -05:00
|
|
|
printf "/opt/mow/bin \$1 \$2 \$3\n" >> /opt/mow/run
|
2023-07-31 11:16:07 -04:00
|
|
|
|
|
|
|
echo "writing /opt/mow/uninst"
|
|
|
|
printf "#!/bin/sh\n" > /opt/mow/uninst
|
2023-10-27 15:43:17 -04:00
|
|
|
printf "mow -r\n" >> /opt/mow/uninst
|
2023-07-31 11:16:07 -04:00
|
|
|
printf "rm -v /opt/mow/bin\n" >> /opt/mow/uninst
|
|
|
|
printf "rm -v /opt/mow/run\n" >> /opt/mow/uninst
|
|
|
|
printf "rm -v /opt/mow/uninst\n" >> /opt/mow/uninst
|
|
|
|
printf "rm -v /usr/bin/mow\n" >> /opt/mow/uninst
|
|
|
|
printf "rm -rv /opt/mow\n" >> /opt/mow/uninst
|
|
|
|
printf "deluser mow\n" >> /opt/mow/uninst
|
|
|
|
|
|
|
|
useradd -r mow
|
2023-10-27 15:43:17 -04:00
|
|
|
usermod -aG video mow
|
2023-07-31 11:16:07 -04:00
|
|
|
|
2023-10-27 15:43:17 -04:00
|
|
|
chown -R mow:mow /var/footage
|
|
|
|
chown -R mow:mow /var/buffer
|
2023-07-31 11:16:07 -04:00
|
|
|
|
|
|
|
chmod -v +x /opt/mow/run
|
|
|
|
chmod -v +x /opt/mow/bin
|
|
|
|
chmod -v +x /opt/mow/uninst
|
|
|
|
|
|
|
|
ln -sv /opt/mow/run /usr/bin/mow
|
2023-10-08 10:09:15 -04:00
|
|
|
|
|
|
|
sh imgmagick_build.sh
|