Add upgrade scripts and add creating user(s,config) dirs in install scripts

This commit is contained in:
Retro_Guy 2020-12-04 19:41:01 -07:00
parent 2bc087d7e9
commit e9e2f7b5a6
4 changed files with 32 additions and 40 deletions

View File

@ -74,6 +74,8 @@ mkdir -p $spoolpath
echo "done"
echo -n "$configpath..."
mkdir -p $configpath
mkdir -p $configpath/users
mkdir -p $configpath/userconfig
echo "done"
echo
echo -n "Moving files into place..."

View File

@ -81,7 +81,10 @@ cp index.php $webroot
cp -a common $webroot
cp -a rocksolid $webroot
cp -a spoolnews $webroot
cp -a rslight/* $configpath
cp rslight/scripts/*.php $configpath/scripts
mkdir $configpath/upgrade
cp rslight/*.php $configpath/upgrade
cp rslight/*.conf $configpath/upgrade
echo "done"
echo
echo -n "Setting permissions..."
@ -101,31 +104,22 @@ echo
echo -n "Applying configuration..."
sed -i '' -e "s|<spooldir>|$spoolpath/|" $webroot/common/config.inc.php
sed -i '' -e "s|<config_dir>|$configpath/|" $webroot/common/config.inc.php
sed -i '' -e "s|<webserver_user>|$username|" $configpath/rslight.inc.php
sed -i '' -e "s|<site_key>|$site_key|" $configpath/rslight.inc.php
sed -i '' -e "s|<anonymous_password>|$anonymous_password|" $configpath/rslight.inc.php
sed -i '' -e "s|<local_password>|$local_password|" $configpath/rslight.inc.php
sed -i '' -e "s|<admin_password>|$admin_password|" $configpath/admin.inc.php
sed -i '' -e "s|<admin_key>|$admin_key|" $configpath/admin.inc.php
sed -i '' -e "s|<webserver_user>|$username|" $configpath/upgrade/rslight.inc.php
sed -i '' -e "s|<site_key>|$site_key|" $configpath/upgrade/rslight.inc.php
sed -i '' -e "s|<anonymous_password>|$anonymous_password|" $configpath/upgrade/rslight.inc.php
sed -i '' -e "s|<local_password>|$local_password|" $configpath/upgrade/rslight.inc.php
sed -i '' -e "s|<admin_password>|$admin_password|" $configpath/upgrade/admin.inc.php
sed -i '' -e "s|<admin_key>|$admin_key|" $configpath/upgrade/admin.inc.php
echo "done"
echo
echo "***************************************************"
echo "******** YOUR ADMIN PASSWORD IS: '$admin_password'"
echo "***************************************************"
echo
echo "Admin password can be changed in $configpath/admin.inc.php"
echo "Admin password can be changed in $configpath/upgrade/admin.inc.php"
echo
echo "Next step is to visit your site in your browser: /common/setup.php"
echo "to complete configuration"
echo "All new configuration files have been placed in $configpath/upgrade."
echo
echo Add this to crontab for root to link with your remote server, start local
echo server and manage other tasks:
echo "*/5 * * * * cd $webroot/spoolnews ; bash -lc \"php $configpath/scripts/cron.php\""
echo "Please review these files and make changes to existing files as may be necessary"
echo
echo "Once your web server is configured to point to $webroot and serve .php files"
echo "give it a try. If you have trouble, feel free to ask for help in rocksolid.nodes.help"
echo
echo "Note that it may take 10-20 minutes before groups appear on your main page"
echo "If you see files starting to appear in $spoolpath, it should be working"
echo
echo "Installation complete"
echo "Upgrade complete"

View File

@ -74,6 +74,8 @@ mkdir -p $spoolpath
echo "done"
echo -n "$configpath..."
mkdir -p $configpath
mkdir -p $configpath/users
mkdir -p $configpath/userconfig
echo "done"
echo
echo -n "Moving files into place..."

View File

@ -81,7 +81,10 @@ cp index.php $webroot
cp -a common $webroot
cp -a rocksolid $webroot
cp -a spoolnews $webroot
cp -a rslight/* $configpath
cp rslight/scripts/*.php $configpath/scripts
mkdir $configpath/upgrade
cp rslight/*.php $configpath/upgrade
cp rslight/*.conf $configpath/upgrade
echo "done"
echo
echo -n "Setting permissions..."
@ -101,31 +104,22 @@ echo
echo -n "Applying configuration..."
sed -i '' -e "s|<spooldir>|$spoolpath/|" $webroot/common/config.inc.php
sed -i '' -e "s|<config_dir>|$configpath/|" $webroot/common/config.inc.php
sed -i '' -e "s|<webserver_user>|$username|" $configpath/rslight.inc.php
sed -i '' -e "s|<site_key>|$site_key|" $configpath/rslight.inc.php
sed -i '' -e "s|<anonymous_password>|$anonymous_password|" $configpath/rslight.inc.php
sed -i '' -e "s|<local_password>|$local_password|" $configpath/rslight.inc.php
sed -i '' -e "s|<admin_password>|$admin_password|" $configpath/admin.inc.php
sed -i '' -e "s|<admin_key>|$admin_key|" $configpath/admin.inc.php
sed -i '' -e "s|<webserver_user>|$username|" $configpath/upgrade/rslight.inc.php
sed -i '' -e "s|<site_key>|$site_key|" $configpath/upgrade/rslight.inc.php
sed -i '' -e "s|<anonymous_password>|$anonymous_password|" $configpath/upgrade/rslight.inc.php
sed -i '' -e "s|<local_password>|$local_password|" $configpath/upgrade/rslight.inc.php
sed -i '' -e "s|<admin_password>|$admin_password|" $configpath/upgrade/admin.inc.php
sed -i '' -e "s|<admin_key>|$admin_key|" $configpath/upgrade/admin.inc.php
echo "done"
echo
echo "***************************************************"
echo "******** YOUR ADMIN PASSWORD IS: '$admin_password'"
echo "***************************************************"
echo
echo "Admin password can be changed in $configpath/admin.inc.php"
echo "Admin password can be changed in $configpath/upgrade/admin.inc.php"
echo
echo "Next step is to visit your site in your browser: /common/setup.php"
echo "to complete configuration"
echo "All new configuration files have been placed in $configpath/upgrade."
echo
echo Add this to crontab for root to link with your remote server, start local
echo server and manage other tasks:
echo "*/5 * * * * cd $webroot/spoolnews ; bash -lc \"php $configpath/scripts/cron.php\""
echo "Please review these files and make changes to existing files as may be necessary"
echo
echo "Once your web server is configured to point to $webroot and serve .php files"
echo "give it a try. If you have trouble, feel free to ask for help in rocksolid.nodes.help"
echo
echo "Note that it may take 10-20 minutes before groups appear on your main page"
echo "If you see files starting to appear in $spoolpath, it should be working"
echo
echo "Installation complete"
echo "Upgrade complete"