[APKG Script-Server 1.18.0.1] change terminal scripts to WebUI

Who doesn't love third-party apps? Get together and talk about them here.

Moderator: Lillian.W@AST

User avatar
father.mande
Posts: 1810
youtube meble na wymiar Warszawa
Joined: Sat Sep 12, 2015 2:55 am
Location: La Rochelle (France)

Re: [APKG Script-Server] change console scripts to WebUI

Post by father.mande »

Hi,

I don't understand ??? , sorry
You have (normally) two way for entering personal script based on TAR-GZ file
command line :
script_server_mngt integrate_apkg_folder [PATH_to_tgz_file]
... example if SC_for_test.tgz is in /share/Public : script_server_mngt integrate_apkg_folder /share/Public/SC_for_test.tgz
THIS create a user name test (if not exist), create a folder script_server in the Path define in new_folder.conf INSIDE the tgz (for test : /share/Public/test/)
end create link in script_server /usr/local/AppCentral/scriptserver/script-server/conf/runners/ to script for test (json file)

WebUI using script_admin /asusfr1 (or your own changed password) in script-server Web interface
sc_tart_gz.png
sc_tart_gz.png (64.34 KiB) Viewed 5471 times
use the small folder icon to walk to your TGZ file then execute.

When installed new scripts are linker to test user, so reopen script-server Wui use test / asusfr1 (if not changed) to get the script attach to this user.

Philippe.
AS6602T / AS5202T /AS5002T / AS1002T / FS6706T
agadoc
Posts: 13
Joined: Sun Jan 07, 2018 1:56 am

Re: [APKG Script-Server] change console scripts to WebUI

Post by agadoc »

Hi, ok it works fine now..

by simply upgrading from the old version, I didn't have the option Create_new_folder_from_tar_gz_file in the WebUI of script_admin.

I had to completely uninstall the old version and reinstall the new one.

It's ok now, and it works ^^

thank you ;)
User avatar
father.mande
Posts: 1810
Joined: Sat Sep 12, 2015 2:55 am
Location: La Rochelle (France)

Re: [APKG Script-Server] change console scripts to WebUI

Post by father.mande »

Hi,

OK good news ..
Philippe
AS6602T / AS5202T /AS5002T / AS1002T / FS6706T
zetsu
Posts: 3
Joined: Thu Mar 31, 2022 4:14 pm
Contact:

Re: [APKG Script-Server] change console scripts to WebUI

Post by zetsu »

father.mande wrote:Hi,

After a long unavailability (heath problem even not Covid) :(

I am please to announce the availability for ALL architecture (x86_64, x86, armhf, arm64) of APKG script-server (link to a Youtube video here after) :D
[Name]
scriptserver (dev. Bugy : https://github.com/bugy/script-server ALL CREDITS TO BUGY ; APKG integrator : Father_Mande)
Information :
... https://forum.asustor.com/viewtopic.php?f=42&t=11684 script_admin USAGE and architecture of server

[Version]
APKG 1.16.0.1 (script-server 1.16 + all committed change ... so based on Dev version)

[Require]
Python 3 (Asustor APKG)

[Object]
Script-server is a Web UI for scripts.
As an administrator, you add your existing scripts into Script server and other users would be able to execute them via a web interface. The UI is very straightforward and can be used by non-tech people.
No script modifications are needed - you configure each script in Script server and it creates the corresponding UI with parameters and takes care of validation, execution, etc.

[Features]
Different types of script parameters (text, flag, dropdown, file upload, etc.)
Real-time script output
Users can send input during script execution
Auth (optional): LDAP, Google OAuth, htpasswd file
Access control
Alerts
Logging and auditing
Formatted output support (colors, styles, cursor positioning, clearing)
Download of script output files
Execution history
Admin page for script configuration

[APKG features]
DEFAULT user / password for admin WebUI : script_admin / asusfr1 (change it after first connection)
Integrated scripts to manage APKG and script-server configuration.
use private .htpassword (generated by htpasswd command from Apache)
user have own set of scripts (so you don't have a lot of scripts but separate by user ... multiple users (or all) can share a script.
To install your own script ... a simple file is enough with easy rules ... samples are provided SC_for_test.tgz
Advanced features :
... Beta ... change Script-server Web port and change Icon launcher in A.D.M.
... Beta ... change to SSL (and reverse) if you provide a file with the require certificate (example used Asustor certificate)
... .... ... change are also reported to icon launcher in A.D.M.

[Wiki]
https://github.com/bugy/script-server/wiki
Take care ... not all is documented ... search also information in "issue" https://github.com/bugy/script-server/issues (closed)

[APKG Command : script_server_mngt ]
EVEN large part are in script-server WebUI itself (but targeting APKG)

Code: Select all

 # script_server_mngt
Usage : (RED is for "dangerous")
script_server_mngt start|stop|restart|clean_and_restart
script_server_mngt status
script_server_mngt relink_admin_json ... relink admin json files
script_server_mngt integrate_apkg_folder [PATH_to_tgz_file] ...
                ADD script-server script for a specific folder or APKG (read Doc for detail)
=====
script_server_mngt webui_port_used ... by web script_server server
script_server_mngt change_webui_port_used PORT ...
                Change in AppCentral (icon) and in script-server server config file THEN RESTART
script_server_mngt change_to_https ...
                Change to use HTTPS (if http is used) DO or require a modification in server json file (read the doc) THEN RESTART
script_server_mngt change_to_http ...
                Change to use HTTP (if https is used) DO or require a modification in server json file (read the doc) THEN RESTART
=====
script_server_mngt save_settings ... save conf folder in /share/Public
script_server_mngt save_all_logs ... save logs folder in /share/Public
script_server_mngt remove_history_logs [Script-Server_USER_NAME] ...
                   remove history of shell executed for ALL or for a specific USER only 
=====
script_server_mngt list_users_defined ... list users define to access WebUI
script_server_mngt verif_user_password EXISTING_USER_NAME [Current_Password] ...
               verify the actual password for the user ... providing password in command is less secure
script_server_mngt add_new_user_password NEW_USER_NAME [Password Confirm_Password] ...
               add WebUI access user/password ... providing password in command is less secure
script_server_mngt change_user_password EXISTING_USER_NAME [Password Confirm_Password] ...
               change WebUI password for existing user ... providing password in command is less secure
script_server_mngt supress_user_password EXISTING_USER_NAME ...
               suppress existing user from accessing WebUI
=====
script_server_mngt list_folder_defined ...
               list APKG/FOLDER with script-server interface defined
script_server_mngt create_new_folder FOLDER_NAME FOLDER_PATH USER_NAME [PASSWORD CONFIRM_PASSWORD] ...
               create a new folder with script NO password we use asusfr1
script_server_mngt create_folder_link [FOLDER_TARGET] ...
               create script link for an APKG/FOLDER on specific script-server user
script_server_mngt delete_folder FOLDER_NAME ...
               suppress json link & folder in folder.conf NOT original json & script
=====
DANGEROUS COMMANDS
... change_to_http ; change_to_https ; change_webui_port_used ... made change in script-server server configuration (json) BUT also made change in AppCentral config to reflect change for what icon launch.

[Video]
https://youtu.be/_B_95HTa3tY



[How to install test user & scripts]
Prerequisite for one script : having Bash (ex. using Entware APKG yhen use opkg to install bash)
... copy the file /usr/local/AppCentral/scriptserver/my_data/samples/SC_for_test.tgz to a share in the NAS (using a terminal)
... connect you in Script-Server using script_admin / asusfr1 (or your password)
... select SC_Admin_Folder group
... select Create_new_FOLDER_from_tar_gz_file
... use folder to walk through NAS to your tgz file
... execute

[Download]
Put in APKG dev. corner for official diffusion ... wait ... if delay is too long, I will add a link her.
For people not wanting to wait ... the same version as AppCentral proposal is here :

ADM 4.x 1.17.0.1 : https://www.father-mande.ovh/A/apkg/scr ... .1_any.apk
ADM 3.x archive 1.16.0.1 : https://www.father-mande.ovh/A/apkg/scr ... .1_any.apk

Tar Gzipped for install in script-server of scripts for APKG (use SC_Admin WebUI or command line to install : Create_new_FOLDER_from_tar_gz_file )

For domoticz APKG 1.0 : https://www.father-mande.ovh/A/other/SC ... moticz.tgz (ALL domoticz supported platform ... x86_64, Armhf, Arm64, x86)
] is the best whatsapp mod available for android users
[/size]Philippe.
NB question about script-server are welcome.
Hello I am noob here, How might I begin breaking into a .apkg file.
Last edited by zetsu on Tue Apr 25, 2023 7:37 am, edited 4 times in total.
Check This YOWhatsApp APK to get more change your experience with WhatsApp Messenger.
User avatar
father.mande
Posts: 1810
Joined: Sat Sep 12, 2015 2:55 am
Location: La Rochelle (France)

Re: [APKG Script-Server] change console scripts to WebUI

Post by father.mande »

Hi,

Not sure to understand exactly your question ... but

Build APKG is explain in : https://developer.asustor.com/
... you find tools, documentation and example
... it's also the place to propose to Asustor your APKG to be visible in AppCentral (after Asustor validation)
... update is also manageable

my only advice is : read (and understand :D ) the documentation, read (and understand :D ) the documentation, and last, read (and understand :D ) the documentation,

... you can ask support for questions

As a prerequisite (even not mandatory but better) is to get a good knowledge of A.D.M. architecture (files, folders, init phase, etc. Also having some Linux skills is a good base.

If your question is : how you can look in existing APKG and personalize it (if authorized by the author) ... it's same way just starting by extracting the actual APKG ... after it's the same as building a new one.

F.Y.I. the text quoted is now obsolete, because scriptserver APKG is now available and updated in APppCentral. :D

If you have very precise question, I can try (if I have time) to send you a response, BUT ... I am a USER like you, so I can't replace Asustor for training (look at Asustor college web site)

Philippe..
AS6602T / AS5202T /AS5002T / AS1002T / FS6706T
User avatar
father.mande
Posts: 1810
Joined: Sat Sep 12, 2015 2:55 am
Location: La Rochelle (France)

[APKG Script-Server MAJOR update] change console scripts to WebUI

Post by father.mande »

Hi,

I put in Asustor Dev. corner the last version for script-server : 1.7.3
you can find here a link if you want to update immediately, before Asustor validate the APKG in AppCentral

1.7.3 Major update
... change install procedure, now python3 virtual environment is created dynamically during install, little longer but sure to get the last update
... ADD module for authentication : LDAP3 for managing LDAP auth. and bcrypt to extend htpasswd solution (other method don't require specific python modules)
... solves minor bugs. including management for broken link to json script.
... Ready to support WebUIforXXX APKG generated from the Public Github : https://forum.asustor.com/viewtopic.php?f=42&t=12769
... POSSIBILITY to use htpasswd program (encrypt user/password in Apache format) provide in the APKG if you don't use never install Web Server or have problem with htpasswd from Web Server APKG (armv7l crash for ex.)

PLEASE UPDATE as soon as possible
If you used WebUIformyHD, please wait (1 day) before updating to have the new version of WebUIformyHD available.

file for people wanting to test A.S.AP. :
scriptserver_1.17.3_any.apk.zip
unzip then manual install in AppCentral
(3.3 MiB) Downloaded 203 times
Philippe.
AS6602T / AS5202T /AS5002T / AS1002T / FS6706T
terenceyao
Posts: 4
Joined: Sun Aug 07, 2022 12:12 pm

Re: [APKG Script-Server 1.7.3] MAJOR UPDATE change terminal scripts to WebUI

Post by terenceyao »

Hi, father.mande

My English may not good enough, but hope you can understand what I said. :lol:
First, thank you to offer this great script tool. It help me more convenient to control my script. :D

But it seems SC_Admin_User_Mngt is broken
I can add new user successfully, but I cannot login with new user form WebUI

0_change_current_user_password has same issue too
You can change WebUI password for script_admin,
but when I logout & try login again, script_server is still using the old (default) password.
Hope this issue can be fix quickly. Because this is kind a security problem.
User avatar
father.mande
Posts: 1810
Joined: Sat Sep 12, 2015 2:55 am
Location: La Rochelle (France)

Re: [APKG Script-Server 1.7.3] MAJOR UPDATE change terminal scripts to WebUI

Post by father.mande »

Hi,
What is your ADM version, change for Webserver are done for 4.1.x ... so perhaps a path to verify/modify

Philippe;
AS6602T / AS5202T /AS5002T / AS1002T / FS6706T
User avatar
father.mande
Posts: 1810
Joined: Sat Sep 12, 2015 2:55 am
Location: La Rochelle (France)

Re: [APKG Script-Server 1.7.3] MAJOR UPDATE change terminal scripts to WebUI

Post by father.mande »

Hi,

After my first response (from my phone) a complement :

create user or change password is done using htpasswd a tool provide by Apache
Path to htpasswd is in ADM 3.x : /usr/builtin/bin/htpasswd (path from Apache webserver include)
Path to htpasswd is in ADM 4.x : /volume1/.@plugins/AppCentral/httpd-2.4.43/data/binary/bin/htpasswd also same as /usr/local/AppCentral/httpd-2.4.43/data/binary/bin/htpasswd (path to the NEW Webserver APKG to be installed)

In last update of scriptserver ... I use a link to htpasswd : /usr/local/AppCentral/scriptserver/my_data/htpasswd
This link target Web Server APKG htpasswd if exist : /volume1/.@plugins/AppCentral/httpd-2.4.43/data/binary/bin/htpasswd
OR if Web Server is NOT installed it's a link to my own htpasswd I provide with scriptserver ... based on architecture ... all htpasswd are in /usr/local/AppCentral/scriptserver/my_data

So check if the link /usr/local/AppCentral/scriptserver/my_data/htpasswd exist and test it in a terminal ...
do :
/usr/local/AppCentral/scriptserver/my_data/htpasswd --help ... to get the help if it is correctly installed ... if not ask me providing NAS series (x86, x8_64, aarch64 (arm64) or armv7l (arm)) and the ADM version.

Philippe.
AS6602T / AS5202T /AS5002T / AS1002T / FS6706T
terenceyao
Posts: 4
Joined: Sun Aug 07, 2022 12:12 pm

Re: [APKG Script-Server 1.7.3] MAJOR UPDATE change terminal scripts to WebUI

Post by terenceyao »

father.mande wrote:Hi,
What is your ADM version, change for Webserver are done for 4.1.x ... so perhaps a path to verify/modify

Philippe;
Never mind, I found the solution. XD
I found I need to restart the script_server. :lol:
Post Reply

Return to “Developer's Corner”