add install script
This commit is contained in:
parent
fda48edaf0
commit
c85cb24277
20
instaler_server.sh
Normal file
20
instaler_server.sh
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
echo Contraseña:
|
||||||
|
read -s pas
|
||||||
|
qmake -makefile ServidorTFG.pro && make -j$(nproc)
|
||||||
|
useradd remotebuilds
|
||||||
|
echo $pas | sudo -S mkdir /opt/serverRemoteBuilds
|
||||||
|
echo $pas | sudo -S mv ServidorTFG /opt/serverRemoteBuilds
|
||||||
|
echo $pas | sudo -S chown -R remotebuilds /opt/serverRemoteBuilds
|
||||||
|
echo $pas | sudo -S chmod a+w /etc/sudoers && echo "remotebuilds ALL=(ALL) ALL, NOPASSWD:/opt/serverRemoteBuilds" && sudo chmod a-w /etc/sudoers
|
||||||
|
echo $pas | sudo -S echo "security=yes" >> /opt/serverRemoteBuilds/config
|
||||||
|
echo "write a port to listen"
|
||||||
|
read port
|
||||||
|
echo $pas | sudo -S echo "port=$port" >> /opt/serverRemoteBuilds/config
|
||||||
|
echo "write a cert path"
|
||||||
|
read cert
|
||||||
|
echo $pas | sudo -S echo "cert=$cert" >> /opt/serverRemoteBuilds/config
|
||||||
|
echo "write a key path"
|
||||||
|
read key
|
||||||
|
echo $pas | sudo -S echo "key=$key" >> /opt/serverRemoteBuilds/config
|
||||||
|
mysql <installDB.sql> output.tab
|
||||||
|
echo $pas | sudo -S cp serverRemoteBuild /etc/init.d/
|
Loading…
Reference in New Issue
Block a user