Merge branch 'nightly' into fix/image-paths
This commit is contained in:
@@ -1 +0,0 @@
|
||||
# See our documentation at https://docs.lizardbyte.dev/projects/sunshine
|
||||
@@ -1,2 +0,0 @@
|
||||
/usr/local/sunshine/config/sunshine.conf
|
||||
/usr/local/sunshine/config/apps.json
|
||||
@@ -12,27 +12,6 @@ else
|
||||
echo "Warning: /etc/group not found"
|
||||
fi
|
||||
|
||||
if [ -f /usr/local/sunshine/config/sunshine.conf.old ]; then
|
||||
echo "Restoring old sunshine.conf"
|
||||
mv /usr/local/sunshine/config/sunshine.conf.old /usr/local/sunshine/config/sunshine.conf
|
||||
fi
|
||||
|
||||
if [ -f /usr/local/sunshine/config/apps.json.old ]; then
|
||||
echo "Restoring old apps.json"
|
||||
mv /usr/local/sunshine/config/apps.json.old /usr/local/sunshine/config/apps.json
|
||||
fi
|
||||
|
||||
# Update permissions on config files for Web Manager
|
||||
if [ -f /usr/local/sunshine/config/apps.json ]; then
|
||||
echo "chmod 666 /etc/sunshine/apps.json"
|
||||
chmod 666 /usr/local/sunshine/config/apps.json
|
||||
fi
|
||||
|
||||
if [ -f /usr/local/sunshine/config/sunshine.conf ]; then
|
||||
echo "chmod 666 /etc/sunshine/sunshine.conf"
|
||||
chmod 666 /usr/local/sunshine/config/sunshine.conf
|
||||
fi
|
||||
|
||||
# Ensure Sunshine can grab images from KMS
|
||||
path_to_setcap=$(which setcap)
|
||||
if [ -x "$path_to_setcap" ] ; then
|
||||
|
||||
@@ -1,9 +0,0 @@
|
||||
#!/bin/sh
|
||||
#Store backup for old config files to prevent it from being overwritten
|
||||
if [ -f /usr/local/sunshine/config/sunshine.conf ]; then
|
||||
cp /usr/local/sunshine/config/sunshine.conf /usr/local/sunshine/config/sunshine.conf.old
|
||||
fi
|
||||
|
||||
if [ -f /usr/local/sunshine/config/apps.json ]; then
|
||||
cp /usr/local/sunshine/config/apps.json /usr/local/sunshine/config/apps.json.old
|
||||
fi
|
||||
@@ -6,41 +6,10 @@ package_name=org.macports.Sunshine
|
||||
echo "Removing files now..."
|
||||
FILES=$(pkgutil --files $package_name --only-files)
|
||||
|
||||
remove_config=True
|
||||
remove_apps=True
|
||||
|
||||
for file in ${FILES}; do
|
||||
file="/$file"
|
||||
remove_current=True
|
||||
if [[ $file == *sunshine.conf ]]; then
|
||||
if [[ $remove_config == True ]]; then
|
||||
while true; do
|
||||
read -p -r "Do you wish to remove 'sunshine.conf'?" yn
|
||||
case $yn in
|
||||
[Yy]* ) echo "removing: $file"; rm -f "$file"; break;;
|
||||
[Nn]* ) remove_config=False; remove_current=False; break;;
|
||||
* ) echo "Please answer yes or no.";;
|
||||
esac
|
||||
done
|
||||
fi
|
||||
fi
|
||||
if [[ $file == *apps.json ]]; then
|
||||
if [[ $remove_apps == True ]]; then
|
||||
while true; do
|
||||
read -p -r "Do you wish to remove 'apps.conf'?" yn
|
||||
case $yn in
|
||||
[Yy]* ) echo "removing: $file"; rm -f "$file"; break;;
|
||||
[Nn]* ) remove_apps=False; remove_current=False; break;;
|
||||
* ) echo "Please answer yes or no.";;
|
||||
esac
|
||||
done
|
||||
fi
|
||||
fi
|
||||
|
||||
if [[ $remove_current == True ]]; then
|
||||
echo "removing: $file"
|
||||
rm -f "$file"
|
||||
fi
|
||||
echo "removing: $file"
|
||||
rm -f "$file"
|
||||
done
|
||||
|
||||
echo "Removing directories now..."
|
||||
|
||||
@@ -1,7 +1,10 @@
|
||||
@echo off
|
||||
|
||||
rem Get sunshine root directory
|
||||
for %%I in ("%~dp0\..") do set "ROOT_DIR=%%~fI"
|
||||
|
||||
set RULE_NAME=Sunshine
|
||||
set PROGRAM_BIN="%~dp0sunshine.exe"
|
||||
set PROGRAM_BIN="%ROOT_DIR%\sunshine.exe"
|
||||
|
||||
rem Add the rule
|
||||
netsh advfirewall firewall add rule name=%RULE_NAME% dir=in action=allow protocol=tcp program=%PROGRAM_BIN% enable=yes
|
||||
|
||||
27
src_assets/windows/misc/service/install-service.bat
Normal file
27
src_assets/windows/misc/service/install-service.bat
Normal file
@@ -0,0 +1,27 @@
|
||||
@echo off
|
||||
|
||||
rem Get sunshine root directory
|
||||
for %%I in ("%~dp0\..") do set "ROOT_DIR=%%~fI"
|
||||
|
||||
set SERVICE_NAME=sunshinesvc
|
||||
set SERVICE_BIN="%ROOT_DIR%\tools\sunshinesvc.exe"
|
||||
set SERVICE_START_TYPE=auto
|
||||
|
||||
rem Check if sunshinesvc already exists
|
||||
sc qc %SERVICE_NAME% > nul 2>&1
|
||||
if %ERRORLEVEL%==0 (
|
||||
rem Stop the existing service if running
|
||||
net stop %SERVICE_NAME%
|
||||
|
||||
rem Reconfigure the existing service
|
||||
set SC_CMD=config
|
||||
) else (
|
||||
rem Create a new service
|
||||
set SC_CMD=create
|
||||
)
|
||||
|
||||
rem Run the sc command to create/reconfigure the service
|
||||
sc %SC_CMD% %SERVICE_NAME% binPath= %SERVICE_BIN% start= %SERVICE_START_TYPE%
|
||||
|
||||
rem Start the new service
|
||||
net start %SERVICE_NAME%
|
||||
7
src_assets/windows/misc/service/uninstall-service.bat
Normal file
7
src_assets/windows/misc/service/uninstall-service.bat
Normal file
@@ -0,0 +1,7 @@
|
||||
@echo off
|
||||
|
||||
set SERVICE_NAME=sunshinesvc
|
||||
|
||||
net stop %SERVICE_NAME%
|
||||
|
||||
sc delete %SERVICE_NAME%
|
||||
Reference in New Issue
Block a user