1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/cac-proxy_ynh.git synced 2024-09-03 18:16:07 +02:00

Add missing config for user to connect ssh

This commit is contained in:
Gérard Collin 2023-02-14 16:31:05 +01:00
parent 2bbccd9cc8
commit c611340e54
5 changed files with 22 additions and 5 deletions

9
.idea/cac-proxy_ynh.iml Normal file
View file

@ -0,0 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<module type="JAVA_MODULE" version="4">
<component name="NewModuleRootManager" inherit-compiler-output="true">
<exclude-output />
<content url="file://$MODULE_DIR$" />
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
</module>

View file

@ -14,7 +14,7 @@
setup_private=0
setup_public=1
upgrade=1
upgrade=0 from_commit=CommitHash
upgrade=1 from_commit=b446048d123428f5260c5757245e8ed5ad454fb0
backup_restore=1
multi_instance=0
port_already_use=0

View file

@ -6,7 +6,7 @@
"en": "An advanced https proxy allowing you to call other websites from your own web application.",
"fr": "Un proxy https avancé vous permettant d'appeler d'autres sites depuis votre propre application web."
},
"version": "1.0~ynh1",
"version": "1.0~ynh2",
"url": "https://github.com/gcollin/cookie-aware-cors-proxy",
"upstream": {
"license": "MIT",

View file

@ -122,7 +122,7 @@ ynh_use_nodejs
ynh_script_progression --message="Configuring system user..." --weight=1
# Create a system user
ynh_system_user_create --username=$app --home_dir="$final_path"
ynh_system_user_create --username=$app --use_shell --home_dir="$final_path" --groups="ssh.app"
#=================================================
# DOWNLOAD, CHECK AND UNPACK SOURCE

View file

@ -83,8 +83,16 @@ ynh_use_nodejs
#=================================================
ynh_script_progression --message="Making sure dedicated system user exists..." --weight=1
# Create a dedicated user (if not existing)
ynh_system_user_create --username=$app --home_dir="$final_path"
#Recreate the user to enable shell if needed
user_shell=$(grep "^$app:" /etc/passwd | cut -d: -f7)
if [ "$user_shell" == "/usr/sbin/nologin" ]; then
chsh --shell /bin/sh $app
fi
# Ensure the use can connect through ssh
user_groups=$(groups "$app")
if [[ "$user_groups" != *"ssh.app"* ]]; then
ynh_system_user_create --username=$app --groups="ssh.app"
fi
#=================================================
# DOWNLOAD, CHECK AND UNPACK SOURCE