Clone helper programs to tmp instead of here

This commit is contained in:
DeathByDenim 2023-06-23 10:47:27 -04:00
parent 1c7a3040c8
commit 5246d0805c
Signed by: DeathByDenim
GPG Key ID: 89185F675E0AB7D5
2 changed files with 6 additions and 10 deletions

View File

@ -78,14 +78,9 @@ fi
export systemuserhome="$( getent passwd "${systemuser}" | cut -d: -f6 )"
# Install the web interface for servers that require interactive shells
if [ -d console2web ]; then
cd console2web
git pull
cd -
else
git clone https://github.com/DeathByDenim/console2web.git
fi
cp console2web/console2web.py /usr/bin/console2web
git clone --depth=1 https://github.com/DeathByDenim/console2web.git ${TMPDIR:-/tmp}/console2web
cp ${TMPDIR:-/tmp}/console2web/console2web.py /usr/bin/console2web
rm -rf ${TMPDIR:-/tmp}/console2web
# Deploy web interface stuff
"$(dirname "$0")"/scripts/deploy_monitoring.sh

View File

@ -15,9 +15,10 @@
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
git clone https://github.com/DeathByDenim/d3-serverstats.git
cd d3-serverstats
git clone https://github.com/DeathByDenim/d3-serverstats.git ${TMPDIR:-/tmp}/d3-serverstats
cd ${TMPDIR:-/tmp}/d3-serverstats
cp serverstats.py /usr/bin/
rm -rf ${TMPDIR:-/tmp}/d3-serverstats
cat > /etc/systemd/system/serverstats.service <<EOF
[Unit]