Deprecated Upstart; Deprecated Squeeze and Trusty
This commit is contained in:
+3
@@ -6,6 +6,9 @@ After=network.target
|
||||
ExecStart=/usr/bin/mono /usr/share/swarmops/backend/Swarmops.Backend.exe
|
||||
WorkingDirectory=/usr/share/swarmops/backend
|
||||
Restart=on-abort
|
||||
User=swarmopsback
|
||||
Group=swarmopsback
|
||||
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
@@ -96,26 +96,18 @@
|
||||
</exec>
|
||||
|
||||
|
||||
<!-- Copy /etc/init.d files for backend (and frontend?) -->
|
||||
|
||||
<exec>
|
||||
<executable>bash</executable>
|
||||
<buildArgs>-c "mv /home/builder/swarmops/sources/continuous/repo/Backend/etcinitd /home/builder/swarmops/builds/internal/backend"</buildArgs>
|
||||
<description>Copying /etc/init.d files for Backend Upstart</description>
|
||||
</exec>
|
||||
|
||||
<!-- Copy /lib/systemd files for backend (and frontend) -->
|
||||
|
||||
<exec>
|
||||
<executable>bash</executable>
|
||||
<buildArgs>-c "mv /home/builder/swarmops/sources/continuous/repo/Backend/etcsystemd /home/builder/swarmops/builds/internal/backend"</buildArgs>
|
||||
<description>Copying /etc/init.d files for Backend Upstart</description>
|
||||
<buildArgs>-c "mv /home/builder/swarmops/sources/continuous/repo/Backend/libsystemd /home/builder/swarmops/builds/internal/backend"</buildArgs>
|
||||
<description>Copying /lib/systemd files for Swarmops Backend</description>
|
||||
</exec>
|
||||
|
||||
<exec>
|
||||
<executable>bash</executable>
|
||||
<buildArgs>-c "mv /home/builder/swarmops/sources/continuous/repo/FrontSocket/etcsystemd /home/builder/swarmops/builds/internal/frontend"</buildArgs>
|
||||
<description>Copying /etc/init.d files for Backend Upstart</description>
|
||||
<buildArgs>-c "mv /home/builder/swarmops/sources/continuous/repo/FrontSocket/libsystemd /home/builder/swarmops/builds/internal/frontend"</buildArgs>
|
||||
<description>Copying /lib/systemd files for Swarmops Frontend</description>
|
||||
</exec>
|
||||
|
||||
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
|
||||
<tr>
|
||||
<td class="header-label"><nobr>Built for:</nobr></td>
|
||||
<td class="header-data">trusty xenial jessie</td>
|
||||
<td class="header-data">xenial jessie stretch</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="header-label"><nobr>Time of build:</nobr></td>
|
||||
|
||||
@@ -96,15 +96,7 @@ if [ "$COPYFILES" == "yes" ]; then
|
||||
rm -rf $DEPLOYDIR/$TARGETDIR/staging
|
||||
fi
|
||||
|
||||
if [ -d $SOURCEDIR/etcinitd ]; then
|
||||
echo "Adding /etc/init.d files..."
|
||||
mkdir -p etc/init.d
|
||||
cp $SOURCEDIR/etcinitd/* etc/init.d/.
|
||||
chmod +x etc/init.d/*
|
||||
ls -la etc/init.d
|
||||
fi
|
||||
|
||||
if [ -d $SOURCEDIR/etcsystemd ]; then
|
||||
if [ -d $SOURCEDIR/libsystemd ]; then
|
||||
echo "Adding /lib/systemd files..."
|
||||
mkdir -p lib/systemd/system
|
||||
cp $SOURCEDIR/etcsystemd/* lib/systemd/system/.
|
||||
@@ -174,7 +166,7 @@ fi
|
||||
cd ../..
|
||||
|
||||
|
||||
scripts/repackage-build-package-distro $PACKAGENAME $DROPFOLDER squeeze,trusty,xenial,jessie $PACKAGE $BUILDID
|
||||
scripts/repackage-build-package-distro $PACKAGENAME $DROPFOLDER xenial,jessie,stretch $PACKAGE $BUILDID
|
||||
|
||||
|
||||
# TODO: FIX INTERNAL INSTALL?
|
||||
|
||||
@@ -2,22 +2,12 @@
|
||||
|
||||
#echo "DEBUG: Executing post-installation script, swarmops-backend"
|
||||
|
||||
#make sure some directories exist
|
||||
mkdir -p /var/lib/swarmops/upload
|
||||
#todo: check for database upgrade
|
||||
adduser --system --group --quiet swarmopsback
|
||||
|
||||
#if we're running systemd, use systemd;
|
||||
#otherwise, use upstart
|
||||
#Upstart deprecated; support systemd only
|
||||
|
||||
if [ -z $(pidof -s systemd) ]; then
|
||||
#start the daemon
|
||||
/etc/init.d/swarmops-backend start
|
||||
#register the daemon
|
||||
update-rc.d swarmops-backend defaults 90 10 > /dev/null
|
||||
else
|
||||
systemctl enable swarmops-backend
|
||||
systemctl start swarmops-backend
|
||||
fi
|
||||
systemctl enable swarmops-backend
|
||||
systemctl start swarmops-backend
|
||||
|
||||
#echo "DEBUG: Exiting post-install script, swarmops-backend"
|
||||
|
||||
|
||||
@@ -2,6 +2,8 @@
|
||||
|
||||
#echo "DEBUG: Executing post-install script, swarmops-frontend"
|
||||
|
||||
adduser --system --group --quiet swarmopsfront
|
||||
|
||||
# make sure the upload folder exists and is writeable by www-data
|
||||
# do not make any changes to an already existing folder
|
||||
|
||||
@@ -77,15 +79,11 @@ chown www-data:www-data /etc/swarmops/database.config
|
||||
|
||||
chown www-data:www-data /etc/swarmops/symmetricKey.config
|
||||
|
||||
# if we stopped Apache in preinst (1st install), restart it
|
||||
# Enable required Apache mods and restart Apache
|
||||
|
||||
if [ -e /tmp/swarmops-restart-apache.flag ]; then
|
||||
/etc/init.d/apache2 start
|
||||
rm /tmp/swarmops-restart-apache.flag
|
||||
else
|
||||
# Actually, _always_ restart Apache - something isn't right otherwise
|
||||
/etc/init.d/apache2 restart
|
||||
fi
|
||||
a2enmod --quiet proxy
|
||||
a2enmod --quiet proxy_wstunnel
|
||||
systemctl restart apache2
|
||||
|
||||
|
||||
# Always end a frontend update with an Apache reload to clear caches
|
||||
|
||||
@@ -7,12 +7,10 @@
|
||||
#echo "DEBUG: Executing pre-install script, swarmops-frontend"
|
||||
|
||||
if [ ! -e /etc/swarmops/database.config ]; then
|
||||
if [ -e /etc/init.d/apache2 ]; then
|
||||
if [ -z $(pidof -s apache2) ]; then
|
||||
# Set a flag to postinst to restart Apache
|
||||
echo foo > /tmp/swarmops-restart-apache.flag
|
||||
/etc/init.d/apache2 stop
|
||||
fi
|
||||
if [ ! -z $(pidof -s apache2) ]; then
|
||||
# Set a flag to postinst to restart Apache
|
||||
echo foo > /tmp/swarmops-restart-apache.flag
|
||||
systemctl stop apache2
|
||||
fi
|
||||
fi
|
||||
|
||||
|
||||
@@ -2,14 +2,9 @@
|
||||
|
||||
#echo "DEBUG: Executing pre-remove script, swarmops-backend"
|
||||
|
||||
# Different paths for systemd and upstart
|
||||
# Support for Upstart deprecated; support systemd only
|
||||
|
||||
if [ -z $(pidof systemd) ]; then
|
||||
update-rc.d -f swarmops-backend remove > /dev/null
|
||||
/etc/init.d/swarmops-backend stop
|
||||
else
|
||||
systemctl stop swarmops-backend
|
||||
systemctl disable swarmops-backend
|
||||
fi
|
||||
systemctl stop swarmops-backend
|
||||
systemctl disable swarmops-backend
|
||||
|
||||
#echo "DEBUG: Exiting pre-remove script, swarmops-backend"
|
||||
|
||||
+2
@@ -6,6 +6,8 @@ After=network.target
|
||||
ExecStart=/usr/bin/mono /usr/share/swarmops/frontend/bin/Swarmops.Frontend.Socket.exe
|
||||
WorkingDirectory=/usr/share/swarmops/frontend
|
||||
Restart=on-abort
|
||||
User=swarmopsfront
|
||||
Group=swarmopsfront
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
@@ -2,6 +2,10 @@ ServerName swarmops-frontend
|
||||
ServerAdmin swarmops-frontend@swarmops.com
|
||||
DocumentRoot /usr/share/swarmops/frontend/
|
||||
|
||||
# Redirect websocket requests to Swarmops FrontSocket server
|
||||
ProxyRequests Off
|
||||
ProxyPass "/ws/" "ws:/localhost:12172"
|
||||
|
||||
# Explicitly specify Mono version 4
|
||||
MonoServerPath swarmops-frontend "/usr/bin/mod-mono-server4"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user