This commit is contained in:
Bozhidar Slaveykov 2023-11-25 22:50:33 +02:00
parent 439b2a162f
commit 1bb1eec769
3 changed files with 11 additions and 10 deletions

View file

@ -7,17 +7,17 @@ sudo apt-get update -y
sudo apt-get install build-essential dpkg-dev debhelper autotools-dev libgeoip-dev libssl-dev libpcre3-dev zlib1g-dev -y
#Download nginx source
wget http://nginx.org/download/nginx-1.20.0.tar.gz
tar -zxvf nginx-1.20.0.tar.gz
cd nginx-1.20.0
wget http://nginx.org/download/nginx-1.24.0.tar.gz
tar -zxvf nginx-1.24.0.tar.gz
cd nginx-1.24.0
# Configure nginx
sudo ./configure --prefix=/usr/local/phyre/nginx
sudo make
sudo make install
sudo mkdir $MAIN_DIR/phyre-nginx-1.20.0
PACKAGE_MAIN_DIR=$MAIN_DIR/phyre-nginx-1.20.0
sudo mkdir $MAIN_DIR/phyre-nginx-1.24.0
PACKAGE_MAIN_DIR=$MAIN_DIR/phyre-nginx-1.24.0
# Create debian package directories
sudo mkdir -p $PACKAGE_MAIN_DIR/DEBIAN
@ -48,9 +48,9 @@ sudo chmod +x $PACKAGE_MAIN_DIR/etc/init.d/phyre
# Make debian package
sudo dpkg-deb --build $PACKAGE_MAIN_DIR
sudo dpkg --info $MAIN_DIR/phyre-nginx-1.20.0.deb
sudo dpkg --contents $MAIN_DIR/phyre-nginx-1.20.0.deb
sudo dpkg --info $MAIN_DIR/phyre-nginx-1.24.0.deb
sudo dpkg --contents $MAIN_DIR/phyre-nginx-1.24.0.deb
# Move debian package to dist folder
sudo mkdir -p $MAIN_DIR/dist
sudo mv $MAIN_DIR/phyre-nginx-1.20.0.deb $MAIN_DIR/dist
sudo mv $MAIN_DIR/phyre-nginx-1.24.0.deb $MAIN_DIR/dist

View file

@ -1,4 +1,4 @@
Defaults:root !requiretty
# sudo is limited to PhyrePanel scripts
phyreweb ALL=NOPASSWD:/usr/local/PhyrePanel/bin/*
phyreweb ALL=NOPASSWD:/usr/local/phyre/bin/*

View file

@ -3,7 +3,8 @@ random_password="wfawfafwafwafaw"
email="wfafwafwa@abv.bg"
# Create the new phyreweb user
#/usr/sbin/useradd "phyreweb" -c "$email" --no-create-home
/usr/sbin/useradd "phyreweb" -c "$email" --no-create-home
# do not allow login into phyreweb user
echo phyreweb:$random_password | sudo chpasswd -e